js 弹出自定义大小网页窗口

180it 2019-11-02 AM 502℃ 0条

<script>
function openWin(u, w, h) {

        var l = (screen.width - w) / 2; 
        var t = (screen.height - h) / 2; 
        var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l; 
        s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no'; 
        open(u, 'oWin', s); 
  }

openWin("http://www.1231818.com", 500, 500);

</script>

支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

js 弹出自定义大小网页窗口