好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

iframe父子页面操作-比较好用的两个方法-window.parent/oframe.conten

发现比较好用的iframe父子页面操作方法,记录一下


1.父页面 test.html



获取iframe var oframe = document.getElementById("main")


获取子页面 var child = oframe.contentWindow.document


获取子页面元素 var test = child.getElementById("test")


获取子页面高度 var childh = child .body.offsetHeight


获取子页面高度


2.子页面 iframe.html


查看更多关于iframe父子页面操作-比较好用的两个方法-window.parent/oframe.conten的详细内容...

  阅读:43次