JavaScript Reference/Javascript Properties/screenY window — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:21, 26 мая 2010

"screenY-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>



"screenY-window" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |window                                                        |
+----------------+--------------------------------------------------------------+



"screenY-window" Syntax and Note

Note:
Read-only property. 
Returns the position of the outer boundary of the browser window. 
    
Syntax:
    
window.screenX
window.screenY