jquery dialog键盘事件代码

时间:2010-08-01    点击:389   
在dilog的open事件中 添加如下代码段
复制代码 代码如下:

$("#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() {
}
});

ajax 缓存 问题 requestheader
parseInt parseFloat js字符串转换数字
style、 currentStyle、 runtimeStyle区别分析
JavaScript为对象原型prototype添加属性的两种方式
javascript函数中的arguments参数
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved