

























这个方法的重点是要理解从asp.net到html的编译后各控件变成是什么
比如textbox类型 > text类型 label > span 类型
知道这样后就可以在在Page_load事件,添加如下代码:
this.CheckBox1.Attributes.Add("onclick","javascript:SelectAllCheck();");
然后再html页面里面写javascript的脚本
这里主要通过样式来控制,如textbox为document.getElementById("id").style.display = "none"//或者block
而label就是直接'id'.style.display = "none"//或者block
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。