js(window.open)浏览器弹框居中显示

    <span style="background-color: rgb(204, 204, 204);"><html>
<meta name="name" content="content" charset="utf-8">
<head>
<script LANGUAGE="javascript"> function openwin(){
var openUrl = "http://www.baidu.com";//弹出窗口的url
var iWidth=; //弹出窗口的宽度;
var iHeight=; //弹出窗口的高度;
var iTop = (window.screen.availHeight--iHeight)/; //获得窗口的垂直位置;
var iLeft = (window.screen.availWidth--iWidth)/; //获得窗口的水平位置;
window.open(openUrl,"","height="+iHeight+", width="+iWidth+", top="+iTop+", left="+iLeft);
}
</script>
</head>
<body >
<a href="javaxript:" onclick="openwin()">点击</a>
</body>
</html></span>
window.open('OperationDetail.aspx?id=' + id, "", "height=" +  + ", width=" +  + ", top=" + (window.screen.availHeight -  - ) /  + ", left=" + (window.screen.availWidth -  - ) / );
上一篇:第三章Div水平居中


下一篇:Rendering in UE4(Gnomon School UE4 大师课笔记)