实例如下: function hiddenPass(event) { var password0 = document.getElementById("password0"); var password1 = document.getElementById("password1"); if (event.keyCode == 13) { } var keycode; if (window.event) { // IE keycode = event.keyCode } else if (event.which) { // Netscape/Firefox/