easyUI之Dialog(对话框窗口)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Dialog(对话框窗口)</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <link rel="stylesheet" href="../themes/default/easyui.css" type="text/css"></link>
    <link rel="stylesheet" href="../themes/icon.css" type="text/css"></link>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/easyui-lang-zh_CN.js"></script>
  </head>
  <body>
    
    <input type="button" value="打开对话框" id="open"/>

    <div style="margin:600px"></div>

    <div id="dd"></div>
    <script type="text/javascript">
        $("#open").click(function(){
            $("#dd").dialog({
                title : "对话框",
                width : 300,
                height : 400,
                left : 200,
                top : 100,
                minimizable : false,
                maximizable : false,
                collapsible : false,
                closable : false,
                draggable : false,
                resizable : true,
                toolbar : [
                    {
                        text:'编辑',
                        iconCls:'icon-edit',
                        handler:function(){alert('edit')}
                    },
                    {
                        text:'帮助',
                        iconCls:'icon-help',
                        handler:function(){alert('help')}
                    }
                ],
                buttons : [
                    {
                        text:'提交',
                        handler:function(){alert("提交");}
                    },
                    {
                        text:'关闭',
                        handler:function(){
                            //关闭对话框
                            $("#dd").dialog("close");    
                        }
                    }
                ],
                href : "/js-day06/easyui/10_form.html"
            });
        });    
    </script>    
        
  </body>
</html>

 

posted on 2018-12-04 10:28  LoaderMan  阅读(476)  评论(0编辑  收藏  举报

导航