BtnPass.Attributes.Add("onclick", "javascript:if(document.getElementById('IsSubmited').value==0){document.getElementById('IsSubmited').value=1;}else{document.getElementById('SpanMsg').innerHTML='正在提交中...';return false;}");
前台代码:
<asp:Button ID="BtnPass" runat="server" Text="通过" CssClass="btn btn-info searchBtn" onclick="BtnPass_Click" /> <input id="IsSubmited" name="IsSubmited" value="0" type="hidden"/><span id="SpanMsg" style="color:red;"></span>