窗口位置

2017-06-16 15:19:00
admin
原创
532
<!DOCTYPE html>
<html>
<head>
    <title>Window Position Example</title>
</head>
<body>
    <script type="text/javascript">
        var leftPos = (typeof window.screenLeft == "number") ? 
                          window.screenLeft : window.screenX;
        var topPos = (typeof window.screenTop == "number") ? 
                          window.screenTop : window.screenY;

        alert("Left: " + leftPos);
        alert("Top: " + topPos);
    </script>
</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络