当前位置:首页 > 站长必备 > window.open 居中显示__ 绝对好用,不妨试试~~

window.open 居中显示__ 绝对好用,不妨试试~~

snuday15年前 (2010-03-31)站长必备59

<script type="text/javascript">
function openwindow(url,name,iWidth,iHeight)
{
    var url;                             //转向网页的地址;
    var name;                            //网页名称,可为空;
    var iWidth;                          //弹出窗口的宽度;
    var iHeight;                         //弹出窗口的高度;
    //获得窗口的垂直位置
    var iTop = (window.screen.availHeight-30-iHeight)/2;       
    //获得窗口的水平位置
    var iLeft = (window.screen.availWidth-10-iWidth)/2;          
    window.open(url,name,'height='+iHeight+',,innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',t
op='+iTop+',left='+iLeft+',status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no');
}
</script>
 


标签: IE窗口

相关文章

IE6-7-8 JS关闭窗口不提示的方法(强制关闭)

 IE6-7 JS关闭窗口不提示的方法 2推荐方法一:js 代码function CloseWin() //这个不会提示是否关闭浏览器{window.opener=null;//w...

Internet Explorer 6 Bugs 解决方法

1、终极方法:条件注释<!--[if lte IE 6]> 这段文字仅显示在 IE6及IE6以下版本。 <![endif]--><!--[if gte IE 6]>...

phpcms2008_标题列表_分隔效果

phpcms2008_标题列表_分隔效果

现在用phpcms2008默认模板改造一下:首先:找到:后台-->模板风格-->模板管理-->[标签]内容列表tag_content_list.html  点击后面修改复制...

用reg格式文件制作、编辑注册表,一键导入

编辑文件导入注册表方式有一般情况下两种是在第一行是写入REGEDIT4或是Windows Registry Editor Version 5.00第二行空掉接下来开始方括号中写明白注册表路径再下行写键...

CSS兼容必备完美实现Firefox、IE6、IE8、Mac等主流浏览器,所有元素清零

CSS兼容必备完美实现Firefox、IE6、IE8、Mac等主流浏览器,所有元素清零

html, body, div, span, applet, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, ac...