84 Star 281 Fork 98

luolonghao/kindeditor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dialog.rst 778 Bytes
一键复制 编辑 原始数据 按行查看 历史

弹出窗口(Dialog) API

.. index:: dialog

K.dialog(options)

创建弹出窗口。

  • 参数:
    • object options: 配置信息
  • 返回: KDialog
  • 继承: KWidget ( :ref:`K.widget` )

示例:

var dialog = K.dialog({
        width : 500,
        title : '测试窗口',
        body : '<div style="margin:10px;"><strong>内容</strong></div>',
        closeBtn : {
                name : '关闭',
                click : function(e) {
                        dialog.remove();
                }
        },
        yesBtn : {
                name : '确定',
                click : function(e) {
                        alert(this.value);
                }
        },
        noBtn : {
                name : '取消',
                click : function(e) {
                        dialog.remove();
                }
        }
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/luolonghao/kindeditor.git
git@gitee.com:luolonghao/kindeditor.git
luolonghao
kindeditor
kindeditor
master

搜索帮助