JavaScript Reference/Javascript Properties/screenX window
Версия от 18:30, 25 мая 2010; (обсуждение)
"screenX-window" Example
<html>
<body>
<script language="JavaScript">
function function2() {
mySX.innerHTML = window.event.screenX;
mySY.innerHTML = window.event.screenY;
}
</script>
<p>
<b>Screen X:</b>
<span id="mySX">0</span>
</p>
<p>
<b>Screen Y:</b>
<span id="mySY">0</span>
</p>
<div id="myDiv"
onmousemove="function2();"
style="border:solid; width:200; height:50; overflow:scroll;">
<img src="yourimage.gif">
</div>
</body>
</html>
"screenX-window" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |window |
+----------------+--------------------------------------------------------------+
"screenX-window" Syntax and Note
Note:
Read-only property.
Returns the position of the outer boundary of the browser window.
Syntax:
window.screenX
window.screenY