Toggle Row Color | JavaScriptSource

Toggle Row Color

Gil Davis Feb 28, 2007

General

Using checkboxes, this script will highlight/unhighlight rows in a table. Useful for selections in data tables. Very simple.


testing!testing!
testing!testing!
testing!testing!
testing!testing!

Notes

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: toggleRowColor.js


CSS

Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Leave a Response

(2 comments)

Great script. simple, yet effective and great for usability! Cheers!

James Mar 13, 2007

Really a simple and good example. I came to know about the parentNode, which is very useful for doing complex stuff very easily.[p]thank you.

Anantha Prakash Feb 28, 2007