サイト内検索

...JavaScript...

JavaScript・サンプル

onmouseover・onmouseoutを指定

table内のの色が変わります

ソース

[headの中]

<style type="text/css">
<!--
.soto{
border:inset 4px #9999dd;
background-color:
#ffffff; padding-top:1%;
padding-left:1%;
}
.soto a{text-decoration: none; color: #995599;}
.soto a:hover{color: red; }
.uti{
width:150px;
height:20px;
text-align: center;
background-color: #ffffff;
}
.naka{
font-size:12px;
width:100%;
}
-->
</style>

[bodyの中]

<table border="1" class="soto">
<tr>
<td class="uti"
onmouseover="this.style.background='#b9b9d9'"
onmouseout="this.style.background='#ffffff'">
<a href="sample-01.html" class="naka" style="color:#995599;">
home
</a>
</td>
</tr>
</table>
</table>
<table border="1" class="soto">
<tr>
<td class="uti"
onmouseover="this.style.background='#b9b9d9'"
onmouseout="this.style.background='#ffffff'">
<a href="sample-02.html" class="naka" style="color:#995599;">
JAVAmemo
</a>
</td>
</tr>
</table>
<table border="1" class="soto">
<tr>
<td class="uti"
onmouseover="this.style.background='#b9b9d9'"
onmouseout="this.style.background='#ffffff'">
<a href="sample-03.html" class="naka" style="color:#995599;">
menu
</a>
</td>
</tr>
</table>

ブラウザ上


Copyright c 2007.10.01 luc All rights reserved.