javascript Change page background color with button -


i trying figure out how code changing background color of page button

so have code button written out , function im having trouble figuring out code use make button change color of entire page

<script>     function changecolor()     {      };     function changetext()     {         alert ("change text in part");     };     function sendmsg()     {         alert ("change msg content here");     } </script> 

<body>     <h1>welcome program!</h1>         <button onclick="changecolor()">color</button>         <button onclick="changetext()">text</button> </br>             <p>can ask ive wanted ask real batman?</p> </br>                  <input type="text" name=""> </body> 

  document.body.style.background = color; 

there's not more it, it's simple that!


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -