$("#txtIndexUsername").keypress(function(e){ if(!e) e = window.event;//火狐中是 window.event if((e.keyCode || e.which) == 13){ //回车后要处理的逻辑 } });
$("#txtIndexUsername").keypress(function(e){ if(!e) e = window.event;//火狐中是 window.event if((e.keyCode || e.which) == 13){ //回车后要处理的逻辑 } });