How to Change IFrame Source using JQuery

Waqas Anwar
14 November 2012
6316 Views

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="http://www.example.com/"></iframe>

<script type="text/javascript">

   $("#myFrame").attr('src', 'http://www.ezzylearning.com');

</script>