R
runner7
The following code works in IE to replace an "enter" keystroke with a
"tab" keystroke in the first text box:
<html>
<head><title></title>
<script type="text/javascript">
function replace(e) {
if (e.keyCode==13) e.keyCode=9
}
</script>
</head>
<body>
<form>
<input onkeydown="replace(event)" /><br />
<input />
</form>
</body>
</html>
If you replace the "keyCode" property with the "which" property for
Firefox, the code does not work in Firefox. Can anyone tell me how to
fix this code to work in Firefox?
"tab" keystroke in the first text box:
<html>
<head><title></title>
<script type="text/javascript">
function replace(e) {
if (e.keyCode==13) e.keyCode=9
}
</script>
</head>
<body>
<form>
<input onkeydown="replace(event)" /><br />
<input />
</form>
</body>
</html>
If you replace the "keyCode" property with the "which" property for
Firefox, the code does not work in Firefox. Can anyone tell me how to
fix this code to work in Firefox?