Skip to main content
 首页 » 编程设计

jQuery 文档说 .submit() 事件在 IE 中不会冒泡。这是什么意思

2026年07月28日6kuangbin

来自jQuery documentation for .submit() :

The JavaScript submit event does not bubble in Internet Explorer. However, scripts that rely on event delegation with the submit event will work consistently across browsers as of jQuery 1.4, which has normalized the event's behavior.

这是什么意思?

请您参考如下方法:

这意味着 jQuery 模仿了提交事件冒泡过程,使其在本身不支持它的浏览器中看起来冒泡。本质上,他们正在编写代码以使其看起来像冒泡。 focus 和 blur 事件也是如此。如果您想将它们用于委托(delegate),请使用规范化的 focusin 和 focusout 事件。