我有 BackoutClaim 页面。单击提交按钮时,我必须禁用该按钮,并且从 POst 方法中,当响应返回时,我必须启用按钮返回。
在下面的代码中,按钮未禁用。感谢您的回复。
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
function TrimThatNameThenSubmit() {
var tableName = $('#tableName').val().replace(/^\s+|\s+$/g, "");
$('#tableName').val(tableName);
**$('#Submit').attr('disabled', 'disabled');**
$('form:eq(0)').submit();
}
</script>
<%
var messages = ViewData["messages"];
%>
<% using (Html.BeginForm()) { %>
<div>
<div class="Spacer"></div>
<div class="RevertCaseStateHeader" align="center">
<%= Html.TextBox("tableName", "Enter tableName to Backout Claim", new { @style = "width: 400px;" })%>
<input type="button" value="Submit" onclick="javascript:TrimThatNameThenSubmit()"/>
</div>
<div class="RevertCaseStateSummary" align="center">
<% if (messages != null)
{ %>
<%= Html.Encode(messages)%>
<% } %>
</div>
</div>
<% } %>
</asp:Content>