<div class="htmlarea"> <textarea id="runcode72860"> <title> 脚本之家 www.jb51.net js菜单特效</title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style> td { padding:5px 10px; color:#ffffff; font-weight:700; font-size:13px; } .tdBg { background-color:#ffffff; color:#000000; font-weight:700; } </style> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#ff0000"> <tr> <td onclick="checkTdBg(this);">首页</td> <td onclick="checkTdBg(this);">房产频道</td> <td onclick="checkTdBg(this);">招聘求职</td> <td onclick="checkTdBg(this);">兼职</td> <td onclick="checkTdBg(this);">跳骚市场</td> <td onclick="checkTdBg(this);">宠物</td> <td onclick="checkTdBg(this);">交友</td> <td onclick="checkTdBg(this);">车辆</td> <td onclick="checkTdBg(this);">生活黄页</td> </tr> </table> <script language="JavaScript"> <!-- function checkTdBg(obj){ var obj_td = document.getElementsByTagName('td'); for( var int_i = 0 ; int_i < obj_td.length ; int_i ++ ){ if( obj_td[int_i] == obj ){ obj_td[int_i].className = 'tdBg'; } else{ obj_td[int_i].className = ''; } } } //--> </script> </textarea><br><input onclick="runEx('runcode72860')" type="button" value="运行代码"> <input onclick="doCopy('runcode72860')" type="button" value="复制代码"> <input onclick="doSave(runcode72860)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>