1.iframe子页面操作父页面:
js:
1>window.parent.document;2>window.parent.xxxx();
jquery:
1>$("#XXX" , parent.document).attr("scrolling","yes");//XXX是父页面iframe的id
2.父页面中操作iframe子页面:
js:
1> var c= document.getElementByIdx_x("XXX").contentWindow;//XXX是父页面iframe的idc.document;//获取子页面中的document对象;
jquery:
1> $(“XXX”).contents().find("#aa");//XXX为iframe的id aa为你要操作的元素的ID