How to add iframe content to main page?
Actually i have iframe which has some important content in it ,but problem is that how ca开发者_开发问答n i have add content to my page in which that iframe resides. Thanks
You can get content of iframe by using following function, than you can add content in main page html.
function getContentFromIframe(iFrameName)
{
var myIFrame = document.getElementById(iFrameName);
var content = myIFrame.contentWindow.document.body.innerHTML;
//Do whatever you need with the content
}
check for more detail : http://www.roseindia.net/java/pass-value-example/pass-value-from-iframe-parent.shtml
精彩评论