编辑下面的代码:【加编码】
<html> <head> <script> function changeSize() { document.getElementById("myframe").height="300"; document.getElementById("myframe").width="300"; } </script> </head> <body> <iframe id="myframe" src="http://ziqiangxuetang.com" height="200" width="200"> <p>Your browser does not support iframes.</p> </iframe> <br><br> <input type="button" onclick="changeSize()" value="Change size"> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂