jquery dialog键盘事件代码


$("#dlgSearch").dialog({
autoOpen: false,
bgiframe: true,
width: 600,
//height: 225,
modal: true,
resizable: false,
open: function() {
//jquery之dialog的键盘事件(输入完毕回车检索)
$(this).bind("keypress.ui-dialog", function(event) {
if (event.keyCode == $.ui.keyCode.ENTER) {
alert("enter pressed!");
}
});
},
buttons: {
"取消": function() {
$(this).dialog("close");
},
"搜索": function() {
}
},
close: function() {
}
});

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdxdxw.html