我在文本框輸入數(shù)據(jù)后,按回車(chē)。文本框的數(shù)據(jù)就會(huì)消失,文本框失去焦點(diǎn)。 我想用js判斷,如果是enter事件,我按回車(chē)后,數(shù)據(jù)不消失,文本框焦點(diǎn)跳到下一個(gè)文本框,怎么做?。?<script type="text/javascript"> function fun_skuevent(th) { //alert(1); if(event.keyCode==13) { var skucode=th.value; th.focus(); document.getElementById("fwmcode").focus(); th.value=skucode; } }</script> <input name="skucode" id="skucode" onKeyPress="fun_skuevent(this)" <input name="fwmcode" id="fwmcode"> 這樣是沒(méi)效果的
javascript Enter事件問(wèn)題?
青春有我
2018-12-07 13:35:24