

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to load external website into an <iframe> using jQuery?
To load an external HTML into <iframe> using jQuery, use the attr() method. In that set the source for iframe. You can try to run the following code to learn how to locate external HTML −
Example
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $('#iframe').attr('src', 'https://www.qries.com'); }); </script> </head> <body> <iframe id="iframe" name="myIframe" frameborder="5" width="500" height="300"></iframe> </body> </html>
- Related Questions & Answers
- How to load external HTML into a <div> using jQuery?
- How to load the content of an iframe dynamically using jQuery?
- How to create an inline frame using the <iframe> tag inside an HTML page?
- Adding options to a <select> using jQuery?
- How to use the <link> tag to define a relationship to an external resource?
- How can I access the content of an iframe using jQuery?
- How to load JSON data using jQuery?
- Enable an extra set of restrictions for the content in an <iframe> in HTML?
- '></a></li></ul><i>xssi</i>
- How to insert an element into DOM using jQuery?
- How to adjust the height of a div with an iframe inside using jQuery?
- How to add a new list element under a <ul> using jQuery?
- How can I set the content of an iframe without src using jQuery?
- How can I remove everything inside of a <div> using jQuery?
- How to load an HTML file into the canvas?
Advertisements