Web Developer's Room
HOME > DHTML サンプル集 > 基本編     

基本編

テーブル選択行をマウスカーソルによって背景色を変える

<html>
<body>

<table border=1 width=100%>
<tr onmouseover="this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor='#ffffff'"><td>テキスト1
<tr onmouseover="this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor='#ffffff'"><td>テキスト1
<tr onmouseover="this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor='#ffffff'"><td>テキスト1
<tr onmouseover="this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor='#ffffff'"><td>テキスト1
<tr onmouseover="this.style.backgroundColor='#cccccc'" onmouseout="this.style.backgroundColor='#ffffff'"><td>テキスト1
</table>

</body>
</html>

 サンプル




スポンサードリンク


(C) Web Developer's Room All rights reserved.