代码编辑器:
x
1
<script>
2
function changeSize(){
3
document.getElementById("myframe").height="300";
4
document.getElementById("myframe").width="300";
5
}
6
</script>
7
<iframe id="myframe" src="/static/media/html/demo_iframe.html" height="200" width="200">
8
<p>你的浏览器不支持iframes</p>
9
</iframe>
10
<br><br>
11
<input type="button" onclick="changeSize()" value="修改大小">
12