Friday, September 7, 2012

JavaScript: Force background color



Below is the example to force HTML webpage background color  lightblue:

 <script type="text/javascript">
  function changeBackground(color) {
   document.body.style.background = color;
}

</script>
<body onload="changeBackground('lightblue');">

No comments:

Post a Comment