jquery ui dialog

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>弹出窗体</title>
    <link href="~/Content/jquery-ui.css" rel="stylesheet" />
    <script src="~/js/jquery.min.js"></script>
    <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
</head>
<body>
    <button id="opener">open the dialog</button>
    <button id="btn1">test1</button>
    <div id="dialog" title="Dialog Title">
        I'm a dialog<br /><br />
        <table>
            <tr>
                <td style="text-align:right">name:</td>
                <td><input type="text" /></td>
            </tr>
            <tr>
                <td style="text-align:right">age:</td>
                <td><input type="text" /></td>
            </tr>
        </table>
    </div>


    <script>
        $("#dialog").dialog({
            modal: true,
            autoOpen: false,
            show: "blind",  //打开时的效果
            hide: "explode",//关闭时的效果
            height: 530,
            width: 500,
            draggable: true, //true可以拖动,默认值就是true
            closeOnEscape: true, //是否采用esc键退出对 话框 如果true 采用esc
            resizable: true, //是否可以改变高度
            buttons: {//添加按钮操作
                "确定": function () {
                    $(this).dialog("close"); //关闭对话框
                },
                "取消": function () {
                    alert("取消的操作");
                }
            }
        });


        $("#opener").click(function () {
            $("#dialog").dialog("open");
        });
    </script>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值