<html>
<head>
</head>
<body>
<table >
<tr >
<td onclick="this.backgroundColor='#0069AD'" onMouseout="this.backgroundColor=''">甲1111111111 </TD>
<td >乙2222222222 </TD>
<td >丙3333333333 </TD>
<td >丁4444444444 </TD> </tr>
</table>
</body>
</html>
其它都一样。
<head>
</head>
<body>
<table >
<tr >
<td onclick="this.backgroundColor='#0069AD'" onMouseout="this.backgroundColor=''">甲1111111111 </TD>
<td >乙2222222222 </TD>
<td >丙3333333333 </TD>
<td >丁4444444444 </TD> </tr>
</table>
</body>
</html>
其它都一样。
解决方案 »
- 急求!!!!window.open与window.showModalDialog相关问题
- 好奇怪啊-----用过swfupload 的来看看why
- javascript字符串的问题
- js下拉菜单问题
- 控制向下焦点,用上箭头键控制向上焦点,十万火急!
- 不懂就ask,这是我的style,求详解??谢谢
- 亲,con2为啥是null
- 求教:各位大虾,关于打印预览的问题。
- 一个广域网使用的设备tree,上千个节点,是一次读入所有节点,还是点击节点再读入下层呢?
- escape好像不能转换"+"号,请问"+"号如何转换成'%2B'
- 如何验证特定的文本框中输入的是否为数字?
- 请问vml的shape元素能不能一次画出多个线和圆弧,而且颜色不一样???
<html>
<head>
</head>
<body>
<script language="javascript">
function chgColor(obj)
{
var theTable = document.getElementById("myTable");
var theTds = theTable.cells;
for(var i=0;i<theTds.length;i++)
{
if(theTds[i]!=obj)
theTds[i].bgColor="white";
else
theTds[i].bgColor="#0069AD";
}
}
</script>
<table id="myTable">
<tr>
<td onclick="chgColor(this);" >甲1111111111 </TD>
<td onclick="chgColor(this);" >乙2222222222 </TD>
<td onclick="chgColor(this);" >丙3333333333 </TD>
<td onclick="chgColor(this);" >丁4444444444 </TD>
</tr>
</table>
</body>
</html>