How to Change IFrame Source using JQuery

In order to change the source of an iframe with jQuery you have to change the src attribute of the HTML element as shown below:

<iframe id="myFrame" src=""></iframe> 

<script type="text/javascript"> 

   $("#myFrame").attr('src', ''); 




About author

User avatar

Waqas Anwar

Founder of, Senior Consultant, Microsoft .NET and Web Technologies