您好, 请教javascript function over() { this.backgroundColor = '#00AAFF';}function out() { this.backgroundColor = '';} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <table> <tr> <td onmouseover="over(this)" onmouseout="out(this)" >111 </td> </tr> </table> <script language="javascript" > function over(oTd){ oTd.style.backgroundColor = "#00AAFF"; } function out(oTd){ oTd.style.backgroundColor = "#FFFFFF"; } </script> protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow ) { e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#C0C0FF';this.style.cursor='hand';"); //当鼠标移走时还原该行的背景色 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor"); } }给你这个参考一下,Attributes里就是js <table> <tr> <td onmouseover="this.style.backgroundColor ='#00AAFF'" onmouseout="style.backgroundColor = '#FFFFFF'">当鼠标经过一个表格时,改变表格的背景颜色为#00AAFF,请补全代码,鼠标移开时,还原表格背景颜色(#FFFFFF)</td> </tr> </table> 借贵地一用:请问各位,用javascript写得网页里,我查看源代码,为什么看不到数据啊?应该是数据的地方是一些如:=BB的一些符号和字符组合。为什么啊?看不懂!!谢谢各位! 一个关于弹出层中嵌套网页的问题。 我滴个神哦~定住浏览器滚动条 div和table隐藏问题? 梅花雨(meizz)的日期控件的一个问题,谢谢来回答。 求救如何把用javascript从数据库取出的时间进行转化 急问,高手指点 高分求新闻发布系统 关于取tr的id问题 不用点击按最小按钮,让打开窗口变得最小 如何动态改变canvas 的大小 iframe自动适应连接内容高度的问题 解析xml空白 undefined问题
<table>
<tr>
<td onmouseover="over(this)" onmouseout="out(this)" >111 </td>
</tr>
</table>
<script language="javascript" >
function over(oTd){
oTd.style.backgroundColor = "#00AAFF";
}
function out(oTd){
oTd.style.backgroundColor = "#FFFFFF";
}
</script>
{
if (e.Row.RowType == DataControlRowType.DataRow )
{
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#C0C0FF';this.style.cursor='hand';");
//当鼠标移走时还原该行的背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor");
}
}给你这个参考一下,Attributes里就是js
<tr>
<td onmouseover="this.style.backgroundColor ='#00AAFF'"
onmouseout="style.backgroundColor = '#FFFFFF'">当鼠标经过一个表格时,改变表格的背景颜色为#00AAFF,请补全代码,鼠标移开时,还原表格背景颜色(#FFFFFF)</td>
</tr>
</table>
请问各位,用javascript写得网页里,我查看源代码,为什么看不到数据啊?应该是数据的地方是一些如:=BB的一些符号和字符组合。为什么啊?看不懂!!谢谢各位!