<table width=480 bgcolor=ffffff>
<tr>
<td onclick='this.parentElement.parentElement.style.background="ffee00"'>
单击</td><td> </td></tr><tr><td> </td><td> </td></tr></table>
<tr>
<td onclick='this.parentElement.parentElement.style.background="ffee00"'>
单击</td><td> </td></tr><tr><td> </td><td> </td></tr></table>
解决方案 »
- 有一个div,高度190px,div的内容超过了本身的高度,我想隐藏前面的内容,显示最后的内容,牛人告诉我该怎么做...
- a标签如何在前台调用后台的代码
- 100分求解,关于IE和Firefox中javascript的event.x,event.y的问题
- 请教一个jquery的问题, 取得事件的索引
- 急!!!!!iframe层怎样才能在父页上面??
- 高分相送~!各位大哥哥大姐姐,帮帮忙看看怎么把我的二级菜单改成三级的~!
- 比较麻烦的问题
- 我想通过写函数的办法,使这个事件onblur="....." 不执行。请问怎么解决??
- 关于警告框的使用(万分火急,帮助感激不尽)
- 请问:能否加密Javascript的函数文件?
- javascript中调用jsp
- 用javascript有没有简单的办法取得3天后的年月日,而不用进行闰年之类的判断
然后使用OnClick事件。太久没理会过网页编程了。
都不会了。
:(
主要目的就是单击<td>变色,说明为选中,如果再单击别的,另外一个<td>就要变回原来的颜色。
<tr>
<td bgcolor="dddddd" onclick="javascript:if(this.style.background=='#ffee00') this.style.background='#dddddd'; else this.style.background='#ffee00'">
<table border=1 width=400 align=center>
<tr align=center>
<td onfocus="this.style.backgroundColor='#6699cc'" onblur="this.style.backgroundColor=''">This</td>
<td onfocus="this.style.backgroundColor='#6699cc'" onblur="this.style.backgroundColor=''">That</td>
</tr>
</table>不知道我理解的对不对?