//跳转输入框按键操作 this.keypress_gopage = function() { var event = arguments[0] || window.event; var code = event.keyCode || event.charCode; //delete key if (code == 8) return true; //enter key if (code == 13) { this.gopage(); return false; } //copy and paste if (event.ctrlKey && (code == 99 || code == 118)) return true; //only number key if (code < 48 || code > 57) return false; return true; }