JavaScript Reference/Javascript Properties/screenX window — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 08:21, 26 мая 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