【发布时间】:2014-02-17 20:20:40
【问题描述】:
这是我添加客户记录的 jquery 代码:
$("#dialog-form").dialog({
autoOpen: false, //Shows dialog
height: 300,
width: 220,
modal: true,
buttons: {
"Save": function () {
$(this).dialog('close');
alert("Customer successfully added!");
$.post('insertcus.php', $('#customer').serialize(), function(result){
});
},
"Cancel": function () {
$(this).dialog("close");
}
}
});
按下回车键时如何自动点击保存按钮? 保存后如何自动刷新一个字段? 我想刷新我的输入选择字段。
【问题讨论】:
-
使用.trigger()方法
-
$("#dialog-form").dialog({...}); 引用的对话框实际使用的插件是什么?因为 jqmodal 没有这样的方法。
-
如?我还有其他选择吗?
标签: javascript jquery modal-dialog jqmodal