html代码
<input onkeyup="bindKeyUpFun(this,upEvent)"/>
js
//绑定keydown事件
function bindKeyUpFun(me,callback){
var e = window.event || arguments.callee.caller.arguments[0];
if(e.keyCode==13 || e.which==13){
callback();
}
}
function upEvent(){
}
网友评论