简体   繁体   中英

Manually trigger onLoad event of iFrame

I have two different pages: the main page and the second page (that will be displayed in the main page as an iFrame).

The fact is that I cannot edit the main page, except from the iFrame href link. What I want to do is to manually trigger the iFrame "onLoad" event in the main page, by using jQuery in the second page.

This is getting really hard cause of the impossibility to edit the main page, and the only thing I managed to do is to manually trigger the "ready" event on the second page, but this is not related to the "onLoad" event, unfortunately.

Any help would be greatly appreciated. Thanks in advance.

尝试

parent.$("iframe[src=myhref]").trigger("onload");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM