Return to Kroll Web Design home page

JavaScript Tutorials

« Return

background image:

Click on a square to change the background:

(white background) specifies the web page's background, which can be either a solid color, or a background image. To modify the page background, you can update the value of as shown in the examples below.


<script type="text/javascript">
function bgChange(bg)

<b>Click on a square to change the background:</b>

<table width="400" height="100" border="2">
  <td width="100" background="../../images/background_tile1.jpg"
  <td width="100" background="../../images/background_tile2.jpg"
  <td width="100" background="../../images/background_tile3.jpg"
  <td width="100" bgcolor="white" align="center"
      onclick="bgChange('white')"><div class="fine-print">(white background)</div></td>

« Return

©2012 Kroll Design    781.910.3694
Last modified: 12/31/1969 7:00 PM