关于提交按钮的问题
网页上有个提交按钮,我想实现用户一点提交按钮,然后该按钮就变为不可使用,提交成功,又可以使用了,这样如何实现?
------解决方案--------------------button1.enable = false
------解决方案-------------------- <body onbeforeunload= "javascripot:return DisabledButton() ">
<asp:Button ID= "btnSave " runat= "server " OnClientClick= "javascript:gBtnDisabled=this " OnClick= "btnSave_Click " Text= "保存 " />
<script>
var gBtnDisabled = null;
function DisabledButton()
{
if(gBtnDisabled!= null)
{
alert( "## ");
gBtnDisabled.disabled = true;
}
}
</script>
后台测试:
protected void btnSave_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000);
}