Is there any way to access an Iframe's content using javascript. I have been able to write code that does it. But every browser rejects it, not letting me gain access to the iframe's contents. Is there any way to get pass this issue?
function getContent(){
var myIFrame = document.getElementById('the-frame');
var content = myIFrame.contentWindow.document.body.innerHTML;
alert('content: ' + content);
}
<iframe>? Frames are restricted by the same origin policy and crossing origins requires that the owners of the content give your origin permission.