Home  >  Article  >  Web Front-end  >  How jquery implements operations after loading the content of the iframe_jquery

How jquery implements operations after loading the content of the iframe_jquery

WBOY
WBOYOriginal
2016-05-16 17:23:031130browse

Add onload event for iframe

ie use attachEvent("onload",function(){})

firefox, chrome use addEventListener("onload",function(){}), or directly Use onload=function(){}

Note: iframe.attachEvent returns undefined under Firefox and Chrome, which can be translated into false. This can solve the defect of writing the onload event differently from that under IE.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn