JSP中用回车监听按钮事件(兼容火狐 IE)script // 兼容FF document.onkeydownkeyListener function key
JSP中用回车监听按钮事件(兼容火狐 IE)
<script>
// 兼容FF
document.onkeydown=keyListener;
function keyListener(e){
e = e ? e : event;
if(e.keyCode == 13){
onsubmit();
}
}
</script>
