jQuery 在iframe中操作父页面某元素的方法

比如实现父页面的滚动

var top = 100;
$(window.parent.document).find('html,body').animate({"scrollTop": top});

查找父页面中的元素

$(window.parent.document).find("某个元素");

或者

$("父页面中的元素选择器", window.parent.document);

 

posted @ 2015-12-15 16:36  Zell~Dincht  阅读(289)  评论(0编辑  收藏  举报