zoukankan      html  css  js  c++  java
  • Asp.net button防止点击多次数据提交

    

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

        <title></title>

        <script src="jquery-1.5.min.js"></script>

        <script>

            function btnServerSaveClick() {

                $("#btnSave").val("正在提交数据...");

                $("#btnSave").attr("disabled", "disabled");

                var ClientBtnSaveID = '<%=btnServerSave.ClientID %>';

                $("#" + ClientBtnSaveID + "").click();

            }

        </script>

    </head>

    <body>

        <form id="form1" runat="server">

        <div>

            <div style="display:none">

            <asp:Button ID="btnServerSave" runat="server" Text="Button" OnClick="btnServerSave_Click" />

                </div>

            <input type="button" value="保存" id="btnSave" onclick="btnServerSaveClick();" />

        </div>

        </form>

    </body>

    </html>

  • 相关阅读:
    MySQL、Redis 和 MongoDB 的优缺点
    解决数据库高并发
    数据库事务
    Mysql 数据库存储的原理?
    CSRF
    MVC模型和MVT模型
    AJAX
    正则表达式-re模块
    ddt-数据驱动测试
    python-时间格式化
  • 原文地址:https://www.cnblogs.com/twodog/p/12140424.html
Copyright © 2011-2022 走看看