开发者

inner html of iframe object error

parent.document.getElementById("next").innerHTML=window.frames['hiddenframe'].document.body.innerHTML;

Error: window.frames.hiddenframe is undefined

this is the error i get. i have given an id for iframes as hiddenframe but still it isnt working.

i cant see to find my mist开发者_如何学编程ake please help.


You need to use the contentWindow property.

document.getElementById('hiddenframe').contentWindow.document.body.innerHTML

That will allow you to access the contents of the iframe.

The way you have it at the moment, you would be accessing the frame via the name attribute, not the ID.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜