"确定/取消"功能基础问题(急) 我的页面有一个button控件,怎样才能用C#实现“确定/取消”功能,使得点击“确定”时,button.Enable = true,否则,button.Enable = false 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <input type=button id=btnOK value="OK" /><script>if(confirm('isOK?')){document.getElementById('btnOK').disabled = '';}else{document.getElementById('btnOK').disabled = 'disabled';}</script> Page_Load 中加入Button1.Attributes.Add("onclick", "this.disabled=true;");//点击后灰色的,不能点击了 this.Button1.Enabled = false; 难道是少了个d?Enabled而不是Enable 哈哈,确实是啊 protected void Button1_Click(object sender, EventArgs e) { Button1.Enabled = false; }这个是服务器控件事件,如果lz实用的是HTML控件,需要添加"runat=server" Button1.Enabled = false; button.Enabled=false;button.Enabled=true; <asp:Button id=Button1 onclick="Button_Click" runat="server">protected void Button1_Click(object sender, EventArgs e) { Button1.Enabled = false; } Cookie技术获取IP地址 asp.net(C#) 日期型字符串转为日期型出的问题及疑惑 本人菜鸟,传参 100分---Asp.net页面的数据如何保存为access文件? 这是什么意思:response.Redirect("showerr.asp?action=stop")? crysalreport 请问如何获取硬盘或者cpu或者主板id 请问ASP.NET Web API到底有啥用? 调用讯雷批量下载 新手学习asp.net,推荐一本好书给我 System.ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。 varchar类型只能用数字不能用字母
if(confirm('isOK?'))
{
document.getElementById('btnOK').disabled = '';
}
else
{
document.getElementById('btnOK').disabled = 'disabled';
}
</script>
Button1.Attributes.Add("onclick", "this.disabled=true;");//点击后灰色的,不能点击了
{
Button1.Enabled = false;
}这个是服务器控件事件,如果lz实用的是HTML控件,需要添加"runat=server"
button.Enabled=false;
button.Enabled=true;
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Enabled = false;
}