当前位置: 代码迷 >> JavaScript >> javaScript怎么取得引用的html里的内容
  详细解决方案

javaScript怎么取得引用的html里的内容

热度:99   发布时间:2012-04-03 12:38:19.0
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;
  相关解决方案