日期:2014-05-16  浏览次数:20323 次

javaScript如何取得引用的html里的内容
我现在用iframe在一个a.html页中引用了另一个b.html
<IFRAME   NAME= "content_frame "   width=100%   height=100   marginwidth=0   marginheight=0   src= "b.html "> </IFRAME>
在b.html中有个 <div   id= 'c '> abcd </div> ,请问我如何能在a.html中用js取得这个abcd值
谢谢~~~

------解决方案--------------------
document.frames[ "content_frame "].document.getElementById( "c ").innerText;