1 脚本中获取到 button 对象;让后button。click();
2:后台添加控件属性 。attribute.add(”onclick“,"check()");
3 :后台响应chenckedchange事件 需要 设置atupostback=true , 但是这么做会把密码等文本框清空。。。。。所有最好是用脚本实现
4
$(document).ready(function () {
$("#<%=Button1.ClientID%>").attr("disabled", "disabled");
$("#<%=CheckBox1.ClientID%>").click(function () {
$("#<%=Button1.ClientID%>").removeAttr("disabled");
});
})
5 ;脚本验证checkb是否选中;
if ($("#<%=CheckBox1.ClientID%>").checked!="checked") {
alert("你还同意服务条款,请您细看服务条款, !"); $("#<%=CheckBox1.ClientID%>").focus();
return false;
}