<div class="codetitle"> <span><a style="CURSOR: pointer" data="93241" class="copybut" id="copybut93241" onclick="doCopy('code93241')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code93241"> <br><input id="my" onchange="focusTest();"> <br><input id="my" onblur="focusTest();"> <br>function focusTest() <br>{ <br> var my=document.getElementById("my"); <br> if(my.value="") <br> { <br> my.focus();//如果是onblur则执行,起作用; <br> } <br>} <br> </div>