怎样根据事件改变当前 表格行 的 背景色 ?

dreamofprogram 2003-01-13 09:36:31
怎样根据事件改变当前 表格行 的 背景色 ?
我用onclick=“style:bgcolor=#ffffff”,当单击的时候没有反应,

请告诉我,谢谢!
...全文
60 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
yongtang 2003-01-16
  • 打赏
  • 举报
回复
因为使用JavaScript时,它是大小写相关的,所以要注意字母的拼写问题。
tata_1980 2003-01-15
  • 打赏
  • 举报
回复
都行阿
flashasp 2003-01-14
  • 打赏
  • 举报
回复


<table border=1 >
<tr onMouseOver="this.style.backgroundColor = '#00ff00'"

onMouseOut="this.style.backgroundColor= 'ffffff'">
<td>11111111111111111111111111111111</td>

</tr>
<tr onMouseOver="this.style.backgroundColor = '#00ff00'"

onMouseOut="this.style.backgroundColor= 'ffffff'">
<td>3333333333333333333333333333</td>

</tr>
</table>
flbz 2003-01-13
  • 打赏
  • 举报
回复
<table>
<tr onclick="this.style.backgroundColor='#ffffff'">
<td>文字</td>
</tr>
</table>
genuis 2003-01-13
  • 打赏
  • 举报
回复
onclick=this.bgColor='#dadada'
wsj 2003-01-13
  • 打赏
  • 举报
回复
onclick="this.style.backgroundColor='#ffffff'"
wssgwps 2003-01-13
  • 打赏
  • 举报
回复
<table border=1 >
<tr onclick="javascript:this.bgColor='#ff0000'">
<td>11111111</td>
<td>22222222</td>
</tr>
<tr onclick="javascript:this.bgColor='#0000ff'">
<td>33333333</td>
<td>44444444</td>
</tr>
</table>

61,129

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧