看看我写的
这样写就可以
<table><tr><td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white">只有到这里才会变色</td><td>在这里不会变色</td></tr></table>
这样写就可以
<table><tr><td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white">只有到这里才会变色</td><td>在这里不会变色</td></tr></table>
解决方案 »
- ext4的dockedItems有什么用?
- 网站高耗cpu,求解
- js 问题点击button时。input可用
- 怎样让火狐支持这段代码?
- 带JS的网页如何在内置框架(iframe)中打开,而不在新窗口打开??
- 如何编写JS程序,是在当前页可以回到前面浏览的界面?
- script标签加了src属性标签里就不能加代码了么?
- 为什么eWebEditor在linux下工具栏显示为空?
- [弱问]请教大家一个批量处理层的问题~~~~~~先谢谢了
- javascript传递参数的问题,高分求救!很急,各位帮忙呀!
- document.form.paraMeter.value==""有错吗?
- 如何在showModalDialog打开的窗口里实现分页?
<table border="1" width="375"><tr>
<td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white" width="27">
<input type="checkbox" name="Id" value="1"></td>
<td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white">只有到这里才会变色</td>
<td>在这里不会变色</td></tr><tr>
<td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white" width="27">
<input type="checkbox" name="Id" value="2"></td><td onmouseover=this.parentElement.bgColor="gray" onmouseout=this.parentElement.bgColor="white"> </td>
<td> </td></tr>
</table>想这段代码,我想在一行里任意单元格单击,就让在这行某个单元格里的checkbox选中,这js怎么写呢?
用你给的代码,如果是改变这些单元格的class好象就不行啊!