鼠标放上去 行加高 4px 移开行高 减少 4px
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#cccccc',this.style.fontWeight='';alert(this.height);this.height = parseInt(this.height)+4;");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';this.height = parseInt(this.height)+4;");可是不行
offsetHeight 好像不可以改变
哪位高手 支援下 谢谢
e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#cccccc',this.style.fontWeight='';alert(this.height);this.height = parseInt(this.height)+4;");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';this.height = parseInt(this.height)+4;");可是不行
offsetHeight 好像不可以改变
哪位高手 支援下 谢谢
解决方案 »
- 怎样读取数据库中Decimal类型的值并赋值给label控件显示在页面上?
- 像很多网站账户设置页面里的多个页面标签怎么做的??
- 怪事,转换成double会出错!请看下面
- asp.net2.0购物车问题
- 在ASP。NET 2。0 中的URL映射(URL Mapping)
- 急急,不知道是什么问题, 不会是软件的问题吧!!!!
- 子类如何向基类传递参数
- 在asp.net中怎么做类似于csdn的发送消息的功能??
- 100分再问一个一直没有解决的问题:如何获得用户退出的事件(包括刷新和向前向后按扭),谢谢各位大师
- 怎么在C#中定义一个httpResponse实例?
- 短信猫问题
- Web 网站转 WAP网站的系统
http://topic.csdn.net/u/20091202/21/7a4acbf2-2103-4a11-abff-cf84095d5abf.html
function overTR(){
var trs = document.getElementById("setTbl").getElementsByTagName("tr");
for(var i in trs){
trs[i].onmouseover = function(){
var oldBgColor=this.bgColor;
var oldFontColor=this.style.color;
this.bgColor = "#0000FF";
this.style.color="#FFFFFF";
if(currTR != this&&currTR.tagName=="TR"){currTR.bgColor = oldBgColor; currTR.style.color=oldFontColor;}
currTR = this;
}
}
}
window.onload = function(){overTR();}
这个倒是可以 可是FF不支持 IE7可以
加一行代码: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
//要先给height赋值
e.Row.Attributes.Add("height", "50px");
e.Row.Attributes.Add("onmouseover",
"currentcolor=this.style.backgroundColor;this.style.backgroundColor='#cccccc';alert(this.height);this.height = parseInt(this.height)+4;");
}
<tr height="100px" onmouseover="this.height = parseInt(this.height)+4;" onmouseout="this.height = parseInt(this.height)-4;">
<td >dfdfdf</td>
</tr>
</table>IE7支持 可是ff不支持
我很郁闷ff
e.Row.Attributes.Add("onmouseover", "c=this.style.height;this.style.height='80px'");
//当鼠标移开时还原高度
e.Row.Attributes.Add("onmouseout", "this.style.height=c");