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");