Board logo

标题: ie弹出新窗口居中显示代码 [打印本页]

作者: fangzhen    时间: 2009-11-19 16:32     标题: ie弹出新窗口居中显示代码

<script language="javascript">
      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);
      }
</script>
<a href="javascript:void(openWin('http://www.phpvi.com/', 600, 500));">Test</a>




欢迎光临 PHP开发笔记 (http://phpvi.com/) Powered by Discuz! 6.1.0