| |||||||||||||||||||||||||||||||
| . |
|
Highlight Table Cells Script
IE
Credits: Dynamic Drive Description: Give any table a "rollover" personality with this script! Using it, you can allow the cells of any given table to change color when the mouse rolls over them. This is a very powerful script that can add a little magic to any table, whatever the table is used for. Updated to allow you to exclude particular cells from the rollover effect. In the below demo, we demonstrate the use of this script on two different types of tables. Demo:
Simply insert the below into the <head> section of your page: Now, to apply the "highlight" effect to a table, simply add the following code inside the <table> tag itself, like below: <table onMouseover="changeto('lightgreen')"
onMouseout="changeback('white')"> Where "lightgreen" represents the color the cells change to when the mouse is over them, and "white" the color when the mouse moves out. Feel free to change these values to another. To exclude any cell(s) from the rollover effect, simply give that cell an id="ignore" declaration, inserted inside the <td> tag. For example: <table onMouseover=....
onMouseout=...>
Recommend Us!
Legend
|