Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.com)</title> <script> function changeSrc(){ document.getElementById("myframe").src="http://www.baidu.com"; } </script> </head> <body> <iframe id="myframe" src="http://www.w3big.com"> <p>你的浏览器不支持iframes。</p> </iframe> <br><br> <input type="button" onclick="changeSrc()" value="修改源链接"> </body> </html>