How to change the src (url) of a IFrame using JavaScript

5 sec read

document.getElementById('iframe_id').src = 'newpage.html

iframe_id = The ID for the IFrame

newpage.html = The page that you want to load into the IFrame

Last Updated On March 20, 2018

Leave a Reply

avatar
  Subscribe  
Notify of