[转]window.open居中
生活随笔
收集整理的這篇文章主要介紹了
[转]window.open居中
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
方法:
1 function openWin(u, w, h) { 2 var l = (screen.width - w) / 2; 3 var t = (screen.height - h) / 2; 4 var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l; 5 s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no'; 6 open(u, 'oWin', s); 7 }?
示例:
<a href="javascript:void(openWin('http://www.baidu.com/', 600, 500));">Test</a>?
?
來源:http://blog.csdn.net/liguohuaty/article/details/3467069
轉載于:https://www.cnblogs.com/seasons1987/archive/2012/06/28/2568374.html
總結
以上是生活随笔為你收集整理的[转]window.open居中的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 重采样算法实践 --- (一)
- 下一篇: 下拉框的属性