onblur event not working with google chrome

后端 未结 3 1998
你的背包
你的背包 2021-01-01 03:27

I am trying to use onblur event to close a window. Its working fine in IE, Firefox and safari, but the event does not trigger in chrome. is that a bug in chrome or a mistak

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 03:50

    Chrome accepts OnBlur event. what i have experience is... on check or uncheck of checkbox, chrome do not focus on it.

    Add attribute

    onclick="this.focus()" onblur="yourMethod()"/>
    

    you will see it work fine then.

提交回复
热议问题