<div class="codetitle"> <span><a style="CURSOR: pointer" data="83794" class="copybut" id="copybut83794" onclick="doCopy('code83794')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code83794"> <br> <br> <br><script language="javascript"> <BR>attachEvent("onblur", blur); <BR>function blur() <BR>{ <BR>document.all.form.username.attachEvent("onblur", blur); <BR>if(event.srcElement == document.all.form.username){ <BR>alert("efewef"); <BR>} <BR>} <BR></script> <br> <br> <br><form name="form"> <br><input type="text" name="username" onblur="alert('hello')"> <br> </form> <br> <br> </div> <br>其执行顺序为: <br>先执行alert("hello"); <br>后执行alert("efewef");