zoukankan      html  css  js  c++  java
  • 重构artDialog.prompt方法,让它支持多行文本

      artDialog.prompt = function (content, yes, value) {
                value = value || '';
                var input;

                return artDialog({
                    id: 'Prompt',
                    icon: 'question',
                    fixed: true,
                    lock: true,
                    opacity: .1,
                    content: [
                '<div style="margin-bottom:5px;font-size:12px">',
                    content,
                '</div>',
                '<div>',
                    '<textarea cols=30 rows=5>' + value + '</textarea>',
                '</div>'
                ].join(''),
                    init: function () {
                        input = this.DOM.content.find('textarea')[0];
                        input.select();
                        input.focus();
                    },
                    ok: function (here) {
                        return yes && yes.call(this, input.value, here);
                    },
                    cancel: true
                });
            };

           // 调用
            artDialog.prompt("ok", function (data) { alert(data); }, "ok1");

  • 相关阅读:
    Knol of Fabio Maulo
    调用非.net系统的Webservice的探索 ( 二 ) WSE
    在Sql Server 使用系统存储过程sp_rename修改表名或列名
    Who is locking the DB account?
    (python learn) 7 字典
    (python learn) 8 流程控制
    (python learn) 4 number&& string
    where is the data come from after we drop the table
    (healthy recorder) 治疗第6天
    (python learn) 6 列表
  • 原文地址:https://www.cnblogs.com/lori/p/2350941.html
Copyright © 2011-2022 走看看