CSSOM视图模式outerWidth/outerHeight属性实例页面

回到相关文章 »

代码:

HTML代码:
<button id="button1">点击弹出window.outerWidth</button>
<button id="button2">点击弹出window.outerHeight</button>
                
JS代码:
document.getElementById("button1").onclick = function() {
    alert(window.outerWidth);
};
document.getElementById("button2").onclick = function() {
    alert(window.outerHeight);
};
                

效果: