根据文档 http://www.w3schools.com/jsref/event_onblur.asp
onblur()是支持a标签的,但是我用后发现a标签捕捉不到失去焦点的事件。求教一下各位。代码如下:<HTML> 
<HEAD> 
</HEAD> 
<BODY BGCOLOR="lavender"> <a href="" onfocus="(document.bgColor='red'); return false"> test </a></BODY> 
</HTML>

解决方案 »

  1.   

    <a href="#" onfocus="(document.bgColor='red'); return false" onblur="document.bgColor='lavender'"> test </a>可以啊,有什么问题?
      

  2.   

    document.body.style.backgroundColor = 'red'
      

  3.   

    我这里IE7,IE8,firefox3.6可以,chrome20好像不行。。
      

  4.   

    <a href="" onmouseover="(document.bgColor='red'); return false" onmouseout="(document.bgColor='yellow'); return false"> test </a>
      

  5.   

    我也试了。的确是这样。我一直用chrome的,为什么会这样呢?
      

  6.   

    对于a 没听说过 onblur事件,用 onmouseover 恰当点。
      

  7.   

    你完全可以不写那个onblur事件啊,当你onfocus的时候触发了,你不onfocus的时候不就回复了吗
      

  8.   

    谢谢各位,我找到了解决方法。
    http://stackoverflow.com/questions/2407679/onblur-event-not-working-with-google-chrome