zoukankan      html  css  js  c++  java
  • 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=400; //弹出窗口的宽度;  
            var iHeight=100; //弹出窗口的高度;  
            var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置;  
            var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;  
            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=" + 400 + ", width=" + 600 + ", top=" + (window.screen.availHeight - 30 - 400) / 2 + ", left=" + (window.screen.availWidth - 10 - 600) / 2);
  • 相关阅读:
    bzoj 4260REBXOR
    bzoj 1009GT考试
    cf 621E. Wet Shark and Blocks
    cf 507E. Breaking Good
    cf 766#
    bzoj 3732Network
    bzoj 4300绝世好题
    bzoj 4345[POI2016]Korale
    bzoj 4236JOIOJI
    bzoj 4237稻草人
  • 原文地址:https://www.cnblogs.com/yangwujun/p/7773290.html
Copyright © 2011-2022 走看看