我想增加iframe的宽度,点击“+”按钮。但它不起作用。如何增加使用Javascript单击按钮的iframe的尺寸?
<iframe id="chkframe" src="" height="500" width="250" onchange="getsize()"></iframe>
</br>
<button onclick="pluswidth()" title="Increase Width">+</button>
<script>
function pluswidth(){
var framewidth = documen.getElementById('chkframe').width;
var frame = document.getElementById('chkframe');
var math = framewidth + 1;
frame.width = math;
}
</script>
你有一个错字---> documen。在函数的第一行 –