/* from: http://bbs.blueidea.com/thread-2454387-1-1.html */
大部分情况下:
onkeydown="if(event.keyCode==13) event.keyCode=9;"
就可以
不然的话:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Checkbox Fun</title> <mce:script type="text/javascript"><!-- function focusNext(elemName, evt) { evt = (evt) ? evt : event; var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode); if (charCode == 13 || charCode == 3) { document.form3.elements[elemName].focus( ); return false; } return true; } // --></mce:script> </head> <body> <form name="form3" id="form3"> <input name="n_number" type="text" id="n_number" size="5" onkeypress="return focusNext('n_money', event)"> <input name="n_money" type="text" id="n_money" size="5" onkeypress="return focusNext('n_number', event)"> </form> </body> </html>