Easyui 中dialog小的demo

来源:互联网 发布:js判断所有radio选中 编辑:程序博客网 时间:2024/05/22 17:24

编辑器是Hbuilder

1.代码

<html xmlns="http://www.w3.org/1999/xhtml">    <meta charset="utf-8"><head runat="server">    <title>Dialog</title>    <link href="css/easyui.css" rel="stylesheet" type="text/css" />    <link href="css/icon.css" rel="stylesheet" type="text/css" />    <script src="js/jquery.min.js" type="text/javascript"></script>    <script src="js/jquery.easyui.min.js" type="text/javascript"></script>    <script type="text/javascript">            $(function () {                $('#dlg').dialog({                    title: '对话框',                    iconCls:"icon-edit",                    collapsible: true,                    minimizable: true,                    maximizable: true,                    resizable: true,                    width: 300,                    height: 200,                    modal: true,                    // href: "Content.aspx",                    onClose: function () {                        alert("Close");                    },                    toolbar: [{                        text: 'Add',                        iconCls: 'icon-add',                        handler: function () {                            alert('add');                        }                    }, '-', {                        text: 'Save',                        iconCls: 'icon-save',                        handler: function () {                            alert('save');                        }                    }],                    buttons: [{                        text: 'Ok',                        iconCls: 'icon-ok',                        handler: function () {                            alert('ok');                        }                    }, {                        text: 'Cancel',                        iconCls: 'icon-cancel',                        handler: function () {                            $('#dlg').dialog('close');                        }                    }]                });            });    </script></head><body>    <div id="dlg" class="easyui-dialog" style="width:300px; height:200px;" title="对话框" iconCls="icon-edit">        Content    </div></body></html>

2.样式
这里写图片描述

3.属性
这里写图片描述

4、事件

Dialog的事件和窗口(Window)的事件相同。

5、方法

Dialog的函数方法和窗口(Window)的相同。