2007년 4월 10일 화요일

table의 row의 mouse over, mouse out 에 따른 바탕색 정의

<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>

댓글 없음:

댓글 쓰기