如何实现gridview双击加粗 双击GRIDVIEW某行,该行记录字体加粗,再次双击,则回复原样,请问这种效果应该如何实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void gvLogInfo_RowDataBound(object sender, GridViewRowEventArgs e){ if(e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("click","this.style.字体变粗"); }} 加上这个 cs:protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("ondblclick","chu(this)"); } }还要加段注册的chu(this)的js:<script type="text/javascript"> function chu(obj) { if (obj.className == null || obj.className == "") { obj.className = "cs"; } else { obj.className = ""; } } </script> 看看我上面的回答 还要定义一个cs的样式:<style type="text/css"> .cs { font-weight: bolder; font-size: 20px; } </style> $("table tr").dblclick(functin () { //双击事件的执行代码 var self = $(this); self.hasClass("BoldClass") ? self.removeClass("BoldClass") : self.addClass("BoldClass"); }); 大量计算怎么使用线程 或者是委托 asp.net如何获得文件的虚拟目录? 字符串替换问题 gridview格式控制 AJAXPro的冲突问题 大家帮我看一下这个关于未给存储过程传参数的问题吧 一个关于按钮的问题 各位高手﹕在自定義控件里﹐如何保存臨時資料----在線等 大家帮忙看下这段代码错在哪?谢谢 asp.net system draw 画出来的图片质量差,文字也很模糊。 应用程序池的问题 关于在aspx调用aspx.cs中的函数时遇到的问题
protected void gvLogInfo_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("click","this.style.字体变粗");
}
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("ondblclick","chu(this)");
}
}
还要加段注册的chu(this)的js:
<script type="text/javascript">
function chu(obj) {
if (obj.className == null || obj.className == "") {
obj.className = "cs";
} else {
obj.className = "";
}
}
</script>
看看我上面的回答 还要定义一个cs的样式:
<style type="text/css">
.cs
{
font-weight: bolder;
font-size: 20px;
}
</style>
$("table tr").dblclick(functin () {
//双击事件的执行代码
var self = $(this);
self.hasClass("BoldClass") ? self.removeClass("BoldClass") : self.addClass("BoldClass");
});