Tryit Editor v1.4

<html> <head> <script type="text/javascript"> function changeSource() { document.getElementById("frame1").src="frame_c.htm"; document.getElementById("frame2").src="frame_d.htm"; } </script> </head> <body> <iframe src="frame_a.htm" id="frame1"></iframe> <iframe src="frame_b.htm" id="frame2"></iframe> <br /><br /> <input type="button" onclick="changeSource()" value="Change source of the two iframes"> </body> </html> | Your Result:
Edit the code above and click to see the result. | W3Schools.com - Try it yourself