跳过一项 onblur 功能
我在跳过两个 onblur 函数之一时遇到问题。我可以控制两个 onblur 函数,在某些情况下我必须跳过第一个 onblur 函数。第二个功能是用jquery添加的。我无法更改第一个 onblur 函数,只能跳过。有什么方法可以做到这一点吗? 对不起我的英语。
I have problem with skipping one of two onblur functions. I have control with two onblur functions and in some conditions I have to skip first onblur function. The second function was added with jquery. I can not change the first onblur function, only skip. Is there some way to do this?
Sorry my english.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果 jquery 事件是在初始 onblur 事件之后添加的,则可以在满足跳过条件时根据结构调用 event.stopPropagation 或 event.stopImmediatePropagation 来取消事件传播。
If the jquery event is added after the initial onblur event, you could call event.stopPropagation or event.stopImmediatePropagation to cancel event propagation depending on the structure when skip conditions are met.