Javascript examples for jQuery Method and Property:ajax
Using ajax to change iframe
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.4.3.min.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w w w .j a v a2s . c om*/ $('#changeframe').click(function() { $('#googframe').attr('src','http://www.java2s.com'); }); }); </script> </head> <body> <iframe id="googframe" src="http://www.google.com"></iframe> <input type="button" id="changeframe" value="Change"> </body> </html>