<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="添加" />
<script type="text/javascript">
document.getElementById("Button1").onclick = function() {
var txttitle = document.getElementById("txttitle").value;
if (txttitle == "") {
alert("标题不能为空!");
return false;
}
document.getElementById("Button1").value = "上传中,请等待!";
setTimeout(function() {
var btn = document.getElementById("Button1");
btn.disabled = true;
setTimeout(function() { btn.disabled = false }, 10000);
}, 10);
}
</script>