Using carriage return to monitor button events in JSP is compatible with mainstream browsers such as Foxie

Time:2020-10-8
Copy codeThe code is as follows:
<script>
//FF compatible
document.onkeydown=keyListener;
function keyListener(e){
e = e ? e : event;
if(e.keyCode == 13){
onsubmit();
}
}
</script>