jQuery插件easyUI实现通过JS显示Dialog的方法

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

jQuery插件easyUI实现通过JS显示Dialog的方法

永远爱好写程序   2020-05-15 我要评论

本文实例分析了jQuery插件easyUI实现通过JS显示Dialog的方法。分享给大家供大家参考。具体如下:

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title></title>
  <script src="jquery-easyui-1.3.4/jquery-1.8.0.min.js" type="text/javascript"></script>
  <script src="jquery-easyui-1.3.4/jquery.easyui.min.js" type="text/javascript"></script>
  <script src="jquery-easyui-1.3.4/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
  <link href="jquery-easyui-1.3.4/themes/icon.css" rel="stylesheet" type="text/css" />
  <link href="jquery-easyui-1.3.4/themeshttps://img.qb5200.com/download-x/default/easyui.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript">
    $(function () {
      $("#myDialog").dialog({
        modal: true,
        collapsible: true,       //设置可折叠
        toolbar: [{             //设置工具栏数组
          text: '添加',
          iconCls: 'icon-add',
          handler: function () {
            $.messager.show({ showType: "fade", msg: "添加数据", title: "提示", timeout: 1000 });
          }
        }, {
          text: '保存',
          iconCls: 'icon-save',
          handler: function () {
            $.messager.show({ showType: "fade", msg: "保存数据", title: "提示", timeout: 1000 });
          }
        }],
        buttons: [{          //设置下方按钮数组
          text: '提交',
          iconCls: 'icon-ok',
          handler: function () {
            $.messager.show({ showType: "fade", msg: "提交数据", title: "提示", timeout: 1000 });
          }
        }, {
          text: '取消',
          iconCls: 'icon-cancel',
          handler: function () {
          }
        }]
      });
    });
</script>

希望本文所述对大家jQuery程序设计有所帮助。

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们