zoukankan      html  css  js  c++  java
  • jQuery--对话框插件--dialog

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>对话框插件</title>
            <link href="http://www.imooc.com/data/jquery-ui.css" rel="stylesheet" type="text/css" />
            <link href="style.css" rel="stylesheet" type="text/css" />
            <script src="http://www.imooc.com/data/jquery-1.8.2.min.js" type="text/javascript"></script>
            <script src="http://www.imooc.com/data/jquery-ui-1.9.2.min.js" type="text/javascript"></script>
        </head>
        
        <body>
            <div id="divtest">
                <div class="content">
                    <span id="spnName" class="fl">张三</span>
                    <input id="btnDelete" type="button" value="删除"  class="fr"/>
                </div>
                <div id='dialog-modal'></div>
            </div>
            
            <script type="text/javascript">
                $(function () {
                    $("#btnDelete").bind("click", function () { //询问button事件
                        if ($("#spnName").html() != null) { //假设对象不为空
                            sys_Confirm("您真的要删除该条记录吗?");
                            return false;
                        }
                    });
                });
                function sys_Confirm(content) { //弹出询问信息窗体
                    $("#dialog-modal").dialog({
                        height: 140,
                        modal: true,
                        title: '系统提示',
                        hide: 'slide',
                        buttons: {
                            '确定': function () {
                                $("#spnName").remove();
                                $(this).dialog("close");
                            },
                            '取消': function () {
                                $(this).dialog("close");
                            }
                        },
                        open: function (event, ui) {
                            $(this).html("");
                            $(this).append("<p>" + content + "</p>");
                        }
                    });
                }
            </script>
        </body>
    </html>
  • 相关阅读:
    15--k8s之安全认证
    14--k8s之StorageClass,ConfigMap,Secret
    13--基本存储、高级存储、存储配置
    10--k8s之数据持久化
    9--k8s之Endpoints、健康服务检查、高可用
    8--k8s之service和ingress详解
    7--k8s之Pod控制器详解
    6--k8s之Pod结构、配置、生命周期、调度
    索引原理和慢查询优化
    pymysql模块及sql注入
  • 原文地址:https://www.cnblogs.com/blfshiye/p/5225397.html
Copyright © 2011-2022 走看看