阅读背景:

利用iframe进行父页面和子页面的通信

来源:互联网 

父页面parent.html:

	<span id='parentSpan'>父页面元素</span>
	<iframe src="child1.html" id='frame1'></iframe><br/>
	<iframe src="child2.html" id='frame2'></iframe><br/>
	<button onclick="getChildItem()">调用子页面方法</button>
	<button onclick="getChildItem()">获取子页面元素</button>	<span id='parentSpan'>父页面



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: