JavaScript Reference/Javascript Methods/moveBy — различия между версиями

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

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

"moveBy()" Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
    window.moveBy(100,100);
}
</script>
<input type="button" value="Move the window 100 pixels to the left and 100 pixels 
from the top of the current location" onclick="function1();">
</body>
</html>



"moveBy()" is applied to

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



"moveBy()" Syntax, Parameters and Note

Note:
Moves the window by the specified horizontal and vertical offsets.
    
Syntax:
    
window.moveBy(param1, param2)
Parameters:
    param1   Required; the horizontal offset in pixels.
    param2   Required; the vertical offset in pixels.