跨瀏覽器筆記-Submit鈕Click事件設定disabled的行為差異
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.js"></script>
<script>
$(function () {
$("#form1").submit(function () {
$("#lblMsg").text("處理中,請稍候...");
$("#Button1").prop("disabled",
true);
/*$("#btnSend").prop("disabled", true);*/
});
});
</script>
</head>
<body>
<form
id="form1"
runat="server">
<asp:Button ID="Button1" runat="server"
Text="Button"
/>
<%--<input type="submit" id="btnSend" value="Send" />--%>
<span
id="lblMsg"></span>
</form>
</body>
</html>