ENTER键指定事件
JS写法
document.onkeydown = function(e) {
var ev = (typeof event!= 'undefined') ? window.event : e;
if(ev.keyCode == 13) {
BindList();
return false;
}
}
JQ写法
$(window).keydown( function(e) {
var key = window.event?e.keyCode:e.which;
if(key.toString() == "13"){
BindList();
return false;
}
});