怎么用javascript控制gridview里的RadioButton 怎么用javascript控制gridview里的RadioButton 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对 gridview findcontrol ,找出RadioButton,然后,对RadioButton ,的Attribute 增加 JS就可以了。 for (int i = 0; i < gdvSystemConfig.Rows.Count; i++) { RadioButton rdo = (RadioButton)gdvSystemConfig.Rows[i].FindControl("rdo"); rdo.Attribute.Add("onclick","testMethod()"); } 關鍵是testMethod()這年function怎麼寫?我寫的總是有錯?謝謝 testMethod()是前面页,自己增加:<script> function testMethod() { ........ }</script> 那就是js错误的问题了,用firefox调试一下. testMethod()在这个方法里传一个this,例testMethod(this) 求解决方案 List<Translating_model>条件查找 asp.net2005 Menu控件的字体和背景问题 ajax简单利用的例子? 【求助】ASP.NET中的两个小问题 新手上路,急求各位帮忙!!!!!! 大伙帮我看看这段代码怎么样? 在Web.Config中可以设置错误后转向Error页,那我在C#能取得这个error页的路径吗? 在javascript中怎么取得datagrid中隐藏列的值阿? 有关控件的绝对定位 关于 DataList 项模板输出方式 如何在子窗口中弹出文本框
然后,对RadioButton ,的Attribute 增加 JS就可以了。
{
RadioButton rdo = (RadioButton)gdvSystemConfig.Rows[i].FindControl("rdo");
rdo.Attribute.Add("onclick","testMethod()");
}
testMethod()是前面页,自己增加:<script>
function testMethod() {
........
}</script>