@dana
To show the content of an external web page in an iframe, you can follow these steps:
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>External Web Page Content</title> </head> <body> <iframe id="external-iframe"></iframe> </body> </html> |
1 2 3 4 |
<script> const iframe = document.getElementById('external-iframe'); iframe.src = 'https://example.com'; // Replace with the URL of the desired external web page </script> |
Note: In some cases, loading external content in an iframe is restricted by the website's security policies (e.g., X-Frame-Options). If the external website allows iframe embedding, it should work fine. However, if the website explicitly disallows it, you won't be able to load it inside an iframe.