1 //按下enter键,则等同于点击登录按钮 2 document.onkeydown=function(e){ 3 var e=window.event?window.event:e; 4 if(e.keyCode==13){ 5 document.getElementById('submitbtn').click(); 6 } 7 }
1 //按下enter键,则等同于点击登录按钮 2 document.onkeydown=function(e){ 3 var e=window.event?window.event:e; 4 if(e.keyCode==13){ 5 document.getElementById('submitbtn').click(); 6 } 7 }