不跨域的前提下,window.top
就能获得最顶层的window对象,于是你就可以通过window.top.document.getElementById(...)
或者window.top.$(...)
(window.top.$即是顶层frame的jQuery实例)来查找元素了。
当iframe 嵌套了多层 ,获取到最外层iframe元素的方法
猜你喜欢
转载自blog.csdn.net/weixin_42776027/article/details/104898790
今日推荐
周排行