日期:2014-05-16 浏览次数:20368 次
function returnTab(evt){ var k = window.event ? event.keyCode : evt.which; if( k==13){ var Event = document.createEvent("KeyEvents"); Event.initKeyEvent("keypress",0,0,null,0,0,0,0,0,13);创造这个13 evt.target.dispatchEvent(Event); evt.preventDefault(); } }