返回首页
当前位置: 主页 > 网络编程 > Asp实例教程 >

HTML会变色的表格代码

时间:2012-10-04 20:26来源:知行网www.zhixing123.cn 编辑:麦田守望者

会变色的表格

<style>

table

{

border-collapse:collapse;

border:1px solid black

}

td

{

height:30px;

border:1px solid black

}

</style>

<table width="600" cellpadding="0" cellspacing="0" border="1" >

<tr style="background:#C2DFF1;text-align:center">

<td colspan="3"><b>会变色的表格</b></td>

</tr>

<tr onmouseover="this.bgColor='#C2DFF1'" onmouseout="this.bgColor='#ffffff'">

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr onmouseover="this.bgColor='#C2DFF1'" onmouseout="this.bgColor='#ffffff'">

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

<tr onmouseover="this.bgColor='#C2DFF1'" onmouseout="this.bgColor='#ffffff'">

<td>&nbsp;</td>

<td>&nbsp;</td>

<td>&nbsp;</td>

</tr>

</table>


显示效果如下:(因为网易屏蔽了js,固请大家将代码复制到新建的网页中运行)

会变色的表格
     
     
     

------分隔线----------------------------
标签(Tag):html5 HTML html技巧 html实例教程 html源代码 html基础教程
------分隔线----------------------------
推荐内容
猜你感兴趣