1 / 1
文档名称:

Get the content of an Iframe in Javascript – crossbrowser solution for both IE and Firefox.pdf

格式:pdf   页数:1页
下载后只包含 1 个 PDF 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Get the content of an Iframe in Javascript – crossbrowser solution for both IE and Firefox.pdf

上传人:紫岑旖旎 2012/9/15 文件大小:0 KB

下载得到文件列表

Get the content of an Iframe in Javascript – crossbrowser solution for both IE and Firefox.pdf

文档介绍

文档介绍:IT-Homer 专栏
成功是优点的发挥,失败是缺点的积累! 不为失败找理由,只为成功找
方法……
Get the content of an Iframe in Javascript – crossbrowser solution for both
IE and Firefox
分类: Script 2010-09-10 16:48 190人阅读评论(0) 收藏举报
Get the content of an Iframe in Javascript – crossbrowser solution for both IE and
Firefox
http://roneiv./2008/01/18/get-the-content-of-an-iframe-in-javascript-crossbrowser-
solution-for-both-ie-and-firefox/
 
 
Ok, let’s imagine the use case: I have an iframe somewhere on my page, and when I click a link or a
button I need to get the content of it (could be a textarea .), and then do some stuff with it.
It was easy to do this in IE, but for Firefox I struggled more, as I kept getting the “frame has no
properties” error message in the console. And when I solved this I couldn’t get to the content.
There is a lot of references out there claiming that you could use ['nameOfMyIframe']
or ['nameOfMyIframe'] to get the frame, and then use the .innerHTML to get the con