Window

■種類

オブジェクト

■対応ブラウザ

Netscape 2〜
Internet Explorer 3〜
Safari 1〜
Opera 6〜
Mozilla 1〜

■書式

window.★
  ★=メソッド または プロパティ

■文例

window.print()
a = window.closed
window.moveTo(dx,dy)

■上位オブジェクト

なし

■説明

ウィンドウオブジェクトです。表示されているウィンドウの情報を取得したり、ウィンドウサイズ、位置などを変更できます。サブウィンドウの場合にはWindows XP SP2ではユーザーの許可がないと開いたり操作することはできないので注意が必要です。

■関連オブジェクト/メソッド/プロパティ

・オブジェクト
document, history, location

・メソッド
back, blur, close, focus, forward, home, moveBy, moveTo, open, print, resizeBy, resizeTo, scroll, scrollBy, scrollTo, stop

・プロパティ
closed, defaultStatus, frameRate, innerHeight, innerWidth, locationbar, menubar, opener, outerHeight, outerWidth, personalbar, scrollbars, status, statusbar, toolbar

■サンプルスクリプト

サンプル1