javascript search on docuemt for text on iframe 1

javascript search on docuemt for text on iframe

var myIFrame = document.getElementById("myIframe");
var content = myIFrame.contentWindow.document.body.innerHTML;

Here is what the above code is Doing:
1. It’s getting the iframe element by its id.
2. It’s getting the content of the iframe.
3. It’s getting the body of the content.
4. It’s getting the innerHTML of the body.

Similar Posts