OZONE Asylum
Forums
DHTML/Javascript
putting an event on object row
This page's ID:
30882
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I got this answer to my question and it worked, take a look: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript"> function colorir(){ tabela=document.getElementById("atabela"); nlinhas=tabela.rows.length; //alert("Olá "+nlinhas+"") for(i=0;i<nlinhas;i++) { [b]tabela.rows[i].onmouseover=function(){this.style.backgroundColor="#FF0000"} tabela.rows[i].onmouseout=function(){this.style.backgroundColor="#FFFFFF"}[/b] } } </script> </head> <body onload="colorir()"> <table width="200" border="1" id="atabela"> <tr> <td>Linha1</td> </tr> <tr> <td>Linha2</td> </tr> <tr> <td>Linha3</td> </tr> <tr> <td>Linha4</td> </tr> <tr> <td>Linha5</td> </tr> </table> <!--<a href="java script:qtd()">Quantas linhas?</a>--> </body> </html>
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »