方法一:
document.onkeydown = function (e) { // 回车提交表单
// 兼容FF和IE和Opera
var theEvent = window.event || e;
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code == 13) {
queryInfo();
}
}
方法二:
js中回车触发事件
猜你喜欢
转载自www.cnblogs.com/xulz/p/9208615.html
今日推荐
周排行