Access Iframe Content in jQuery JavaScript
Access Iframe Content in jQuery JavaScript : We can access iframe content using jQuery, javascript. There are many ways to access iframe content. Here in this example we will explain how you can access the iframe content using jQuery or JavaScript. We will explain this with example and demo.
Access Iframe Content in jQuery JavaScript
You can access iframe content simply using the following javascript-
Iframe From Same Domain
If iframe is from same domain you can access content as below –
Access Iframe Content in jQuery JavaScript : Example
var iframeContent = document.getElementById('myIframe').contentWindow.document.body.innerHTML; |
If you run the above example it will produce the following output-
Advertisements