代码示例:(标识:jsck_win_screenleft)
<!DOCTYPE html>
<html>
<body>
<h1>Window 对象</h1>

<h2>screenLeft 和 screenTop 属性</h2>

<p id="demo"></p>

<script>
let x = window.screenLeft;
let y = window.screenTop;
document.getElementById("demo").innerHTML = "Left: " + x + ", Top: " + y; 
</script>

</body>
</html>
运行结果: