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.

document.getBoxObjectFor

廃止
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

概要

指定要素の boxObject (x 座標 / y 座標 / 幅 / 高さ) を返します。

注記: このメソッドは廃止済です。代わりに element.getBoundingClientRect() メソッドを用います。

構文

boxObject = document.getBoxObjectFor(element);

var myDiv = document.getElementById("myDiv"),
    boxObj = document.getBoxObjectFor (myDiv);

alert (
  "x:" + boxObj.x +
  ", y:" + boxObj.y +
  ", Width:" + boxObj.width +
  ", Height:" + boxObj.height
);

注記

このメソッドは nsIXULDocument.idl で定められました。

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: fscholz, Hasilt, ethertank
 最終更新者: Hasilt,