asp.net 让你的 button 变为 disabled的方法
1
<script type="text/javascript">
function chk() {
document.getElementById("Button1").disabled =true;
document.getElementById("Button1").value='submitting...';
return true;
}
οnsubmit="chk();" 提交后触发或者单击触发
<asp:Button ID="Button1" UseSubmitBehavior="false" runat="server" OnClientClick="this.value='submitting...';this.disabled=true;" OnClick="Button1_Click" Text="提交" />
2
this.Button1.Text = "您的代码已生成...";
this.Button1.Enabled = false;
使用控件的属性