javascript - Change site background colour with colour picker -


I am using for my site. I want to change the background of my website body / html , when the selection is in progress as soon as there is a change in the background of the textbox.

I have looked at the JS file but found it a little complicated I have written to the document.body.style.backyle = styleElement.jscStyle.backgroundColor; 410-430 added between lines but nothing changed.

How can I get it?

Thank you

In the demo page you have "Onchange event":

You need to create Input like this:

  & lt; Input class = "color" onchange = "document.body.style.backgroundColor = '#' + this.color" & gt;   

My guess is that in your example, you have forgotten before the # color hex code.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -