Jquery中获取iframe的代码

在子窗口中操作父窗口:window.parent.document

//获取父页面元素
var arrow= $(window.parent.document).find(".detail-center");
//给父页面元素添加点击事件
$(arrow).click(function(){
    $("#Section").toggleClass("Section-active");
 })

猜你喜欢

转载自blog.csdn.net/cherish_all/article/details/77853827
今日推荐