如何通过使用jQuery弹出模式将数据保存到SQL表?

时间:2018-11-11 16:42:54

标签: javascript jquery html css ajax

我想将从模式收集的数据存储到sql server表中。

HTML和JavaScript:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js">
</script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    $(function () {
        $("#dialog").dialog({
            modal: true,
            autoOpen: false,

            title: "LogIn",
            width: 378.84,
            height: 205.84,
            top: 157,
            left: 333
        });
        $("#btnShow").click(function () {
            $('#dialog').dialog('open');
        });

    });
</script>



<input type="button" id="btnShow" value="Login"/>
<div id="dialog" style="display: none" align="center">
    <asp:Label ID="lblUsername" runat="server" Text="UserName"></asp:Label> &nbsp;
    <asp:TextBox ID="TxtUserName" runat="server"></asp:TextBox>
    <br />
    <br />
    <asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label> &nbsp;&nbsp;
    <asp:TextBox ID="TxtPassword2" runat="server"></asp:TextBox>
    <br />
    <br />&nbsp;
    <asp:Button ID="Btnlogin" runat="server" Text="LogIn" OnClick="Btnlogin_Click" style="background-color: #33CC33"/>&nbsp;

</div>

0 个答案:

没有答案