Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

Summary

Moves the current window by a specified amount.

Syntax

window.moveBy(deltaX, deltaY) 

Parameters

  • deltaX is the amount of pixels to move the window horizontally.
  • deltaY is the amount of pixels to move the window vertically.

Example

function budge() {
  moveBy(10, -10);
}

Notes

You can use negative numbers as parameters for this function. This function makes a relative move while window.moveTo makes an absolute move.

Since Firefox 7, it's no longer possible for a web site to move a window in a browser, according to the following rules:

  1. You can't move a window or tab that wasn’t created by window.open.
  2. You can't move a window or tab when it’s in a window with more than one tab.

Specification

Specification Status Comment
CSS Object Model (CSSOM) View Module
The definition of 'window.moveBy()' in that specification.
Working Draft  

See also

문서 태그 및 공헌자

 이 페이지의 공헌자: cvrebert, fscholz, teoli, libreGeekingKid, ethertank, Sheppy, Mgjbot, Dria, JesseW
 최종 변경: cvrebert,