Get Answers!
   

peege0102

Tr Trageting In Javascript PLEASE HELP!!!!

Monday, 30th March 2009

I'm trying to write a script so that every time a check box is clicked the entire tr in the table changes color. I wrote this one for targeting a paragraph so that every time its clicked it changes color. <br> <br>function init(){ <br>var para = document.getElementsByTagName(&quot;p&quot;); <br>for(var p=0; p&lt;para.length; p++){ <br>para[p].onclick = check; <br>} <br>} <br> <br>function check(){ <br> <br>paragraph&quot;); <br>if( this.className == &quot;sample3&quot;){ <br>this.className = &quot;&quot;; <br>}else{ <br>this.className = &quot;sample3&quot;; <br>} <br>} <br> <br>and it works I'm just having problems adapting it, Thanks
 





More Programming:
» Can I Run PHP Code In Tomcat Server 5.x Or 6.x ?
» What Are The Differences Between Using Single Quotes And Double Quotes In PHP?
» How Can I Add 3 Hrs To The Current Time In PHP?
» How Do I Add A Countdown Timer To My Website?
» How To Set Http Request Headers In Java Class ?
» Using PHP How Can I Know If A User Is Logged In?
» Which PHP Ad Manager Do You Recommend For Me To Use?
» In What Ways Is PHP 5 Better Than PHP 4?


Leave a Comment on "Tr Trageting In Javascript PLEASE HELP!!!!"
You must be logged in to post a comment.


Link to This Question!