资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
一种表格背景色渐变效果的实现
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> <style> .menu td{ font-size:12px; color:white; font-weight:bold; background-color:#336699; border:1px solid #336699; border:1px solid #336699; filter:blendtrans(duration=1); text-align:center;} </style> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%20type%3D%22text%2Fjavascript%22%3E%20%0D%0Afunction%20showfilter(obj)%7B%20%0D%0A%20var%20tds%3Dobj.getElementsByTagName(%22td%22)%3B%20%0D%0A%20for(var%20i%3D0%3Bi%3Ctds.length%3Bi%2B%2B)%20%0D%0A%20%20%7Bwith(tds%5Bi%5D)%20%0D%0A%20%20%7Bonmouseover%3Dfunction()%7Bwith(this)%7Bfilters%5B0%5D.apply()%3B%20%0D%0A%20%20%20%20%20style.color%3D'black'%3B%20%0D%0A%20%20%20%20%20style.border%3D'1px%20solid%20white'%3B%20%0D%0A%20%20%20%20%20style.background%3D'%2366ccff'%3B%20%0D%0A%20%20%20%20%20filters%5B0%5D.play()%3B%7D%7D%20%0D%0A%20%20%20onmouseout%3Dfunction()%7Bwith(this)%7Bfilters%5B0%5D.apply()%3B%20%0D%0A%20%20%20%20%20style.color%3D'white'%3B%20%0D%0A%20%20%20%20%20style.border%3D'1px%20solid%20%23336699'%3B%20%0D%0A%20%20%20%20%20style.background%3D'%23336699'%3B%20%0D%0A%20%20%20%20%20filters%5B0%5D.play()%3B%7D%7D%20%0D%0A%20%20%20%20%20%7D%7D%7D%20%0D%0A%3C%2Fscript%3E"> </head> <body> <table width="500" border="1" cellspacing="1" cellpadding="1" class="menu" id="xmenu"> <tr> <td height="30">1111111111111</td> </tr> <tr> <td height="30">2222222222222</td> </tr> <tr> <td height="30">3333333333333</td> </tr> <tr> <td height="30">4444444444444</td> </tr> <tr> <td height="30">5555555555555</td> </tr> <tr> <td height="30">6666666666666</td> </tr> <tr> <td height="30">77777777777777</td> </tr> <tr> <td height="30">88888888888888</td> </tr> <tr> <td height="30">99999999999999</td> </tr> </table> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%3Eshowfilter(xmenu)%3B%3C%2Fscript%3E"> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程