浅沫记忆 发表于 2021-10-23 17:57:53

JSP中用回车监听按钮事件兼容火狐 IE等主流浏览器


<script>
// 兼容FF
document.onkeydown=keyListener;
function keyListener(e){
e = e ? e : event;
if(e.keyCode == 13){
onsubmit();
}
}
</script>

https://www.uoften.com/program/jsp/20180413/47775.html
页: [1]
查看完整版本: JSP中用回车监听按钮事件兼容火狐 IE等主流浏览器