Onmouseover in a TR tag

helloworld
holamundo
hellohello
holamundo
the tr for this row has an onmouseover alert

Source Code:

<style type="text/css">
<!--
body { background: #FFF }
.yellowThing {
background: #FF9;
}
.whiteThing {
background: #FFF;
}
.redThing {
background: #F00;
}
//-->
</style>

<table cellspacing="0" cellpadding="3" border="0">
<tr onmouseover="this.className='yellowThing';"
    onmouseout="this.className='whiteThing';"><td>hello</td><td>world</td></tr>
<tr onmouseover="this.className='yellowThing';"
    onmouseout="this.className='whiteThing';"><td>hola</td><td>mundo</td></tr>
<tr onmouseover="this.className='yellowThing';"
    onmouseout="this.className='whiteThing';"><td>hello</td><td>hello</td></tr>
<tr onmouseover="this.style.background='#F00';"
    onmouseout="this.style.background='#FFF';"><td>hola</td><td>mundo</td></tr>
</table>

<table cellspacing="0" cellpadding="3" border="1">
<tr onmouseover="alert('hello onmouseover'+this.style);"
class="redThing">
    <td>the tr for this row has</td>
    <td>an onmouseover alert</td>
</tr>
</table>
blog comments powered by Disqus