| document プロパティ | ||||||||||||
| activeElement IE4.0 NS | フォーカスのあるエレメント | [Read] W3C | ||||||||||
| alinkColor IE3.02 NS2.0 | アクティブリンクの色 | [Read/Write] W3C | ||||||||||
| bgColor IE3.02 NS2.0 | ページのバックグラウンドカラー | [Read/Write] W3C STEP.28 | ||||||||||
| body IE3.02 NS6 | ドキュメントのBODYエレメントオブジェクト body オブジェクト参照 interface HTMLDocument : Document { attribute HTMLElement body; }; | HTML3.2 W3C(DOM1) | ||||||||||
| charset IE4.0 NS | ドキュメントで使用されているキャラクタセット interface HTMLScriptElement : HTMLElement { attribute DOMString charset; }; | [Read/Write] W3C(DOM1) | ||||||||||
| cookie IE3.02 NS2.0 | ブラウザに蓄積される文字情報 設定はセミコロン区切りの文字列 
 interface HTMLDocument : Document { attribute DOMString cookie; }; | [Read/Write] W3C(DOM1) STEP.96 | ||||||||||
| defaultCharset IE4.0 NS | ドキュメントのデフォルトのキャラクタセット | [Read/Write] W3C | ||||||||||
| domain IE4.0 NS3.0 | ドキュメントのセキュリティドメイン 初期値 = ドキュメントを送信したサーバー interface HTMLDocument : Document { readonly attribute DOMString domain; }; | [Read] W3C(DOM1) | ||||||||||
| expando IE4.0 NS | オブジェクト内でプロパティを作成するかどうか 初期値 = true | [Read/Write] W3C | ||||||||||
| fgColor IE3.02 NS2.0 | ドキュメント内のテキストのフォアグランドカラー 初期値 = black | [Read/Write] W3C | ||||||||||
| lastModified IE3.02 NS2.0 | ページの最終更新日 | [Read] W3C STEP.24 | ||||||||||
| linkColor IE3.02 NS2.0 | ドキュメントのリンクの色 | [Read/Write] W3C | ||||||||||
| location IE3.02 NS2.0 | 現在のURLの情報オブジェクト locationオブジェクト参照 | [Read/Write] W3C STEP.7 | ||||||||||
| parentWindow IE4.0 NS | ドキュメントのウィンドウオブジェクト | [Read] W3C | ||||||||||
| readyState IE4.0 NS | ダウンロードされたオブジェクトの現在の状態 
 | [Read] W3C | ||||||||||
| referrer IE3.02 NS2.0 | 前のロケーションのURL interface HTMLDocument : Document { readonly attribute DOMString referrer; }; | [Read/Write] W3C(DOM1) STEP.12 | ||||||||||
| selection IE4.0 NS | 選択されたドキュメント内のエレメントなどを表すオブジェクト | W3C | ||||||||||
| title IE4.0 NS2.0 | ドキュメント全体の概要 interface HTMLDocument : Document { attribute DOMString title; }; | [Read/Write] HTML3.2 W3C(DOM1) | ||||||||||
| URL IE4.0 NS2.0 | 現在のドキュメントのURL interface HTMLDocument : Document { readonly attribute DOMString URL; }; | [Read/Write] W3C(DOM1) | ||||||||||
| vlinkColor IE3.02 NS2.0 | 表示済みのリンクの色 | [Read/Write] W3C | ||||||||||
| document メソッド | ||||||
| close IE4.0 NS2.0 | 出力ストリームを閉じる。 戻り値 なし 例) document.close() interface HTMLDocument : Document { void close(); }; | W3C(DOM1) STEP.44 | ||||
| getElementById IE5 NS6 | 指定したID属性のエレメントオブジェクトを取得する。 document.getElementById(id) 
 戻り値 指定されたID属性のエレメントオブジェクト 例) myObj = document.getElementById("MENU") interface HTMLDocument : Document { Element getElementById(in DOMString elementId); }; | W3C(DOM1) | ||||
| getElementsByName IE5 NS6 | 指定したNAME属性のエレメントのコレクションを検索する。 document.getElementsByName(name) 
 戻り値 NAME属性エレメントのコレクション 例) myEmt = document.getElementsByName("MENU") interface HTMLDocument : Document { NodeList getElementsByName(in DOMString elementName); }; | W3C(DOM1) | ||||
| open IE3.02 NS2.0 | 出力ストリーム(write , writeln) をオープンする。 document.open(mineType,replace) 
 戻り値なし 例) document.open() document.open("text/html") document.open("text/html","replace") ※NS2.0にはパラメータは指定できない。NS3.0以降でmineType,replaceパラメータが使用できる。 interface HTMLDocument : Document { void open(); }; | W3C(DOM1) STEP.44 | ||||
| write IE3.02 NS2.0 | ドキュメントにHTMLを書き込む。 document.write(str) document.write(str1,…,strN) 
 戻り値 なし 例) document.write("こんにちは") document.write("<font class='default'>") interface HTMLDocument : Document { void write(in DOMString text); }; | W3C(DOM1) STEP.1 | ||||
| writeln IE3.02 NS2.0 | ドキュメントにHTMLを書き込む。最後にキャリッジリターンを付ける。 document.writeln(str) document.writeln(str1,…,strN) 
 戻り値 なし 例) document.writeln("こんにちは") ※<pre>タグ内でなければHTMLではキャリッジリターンは意味を持たない。 interface HTMLDocument : Document { void writeln(in DOMString text); }; | W3C(DOM1) | ||||
| document コレクション | ||
| all IE4.0 NS | エレメントのコレクションへのオブジェクト参照 | W3C | 
| anchors IE3.02 NS2.0 | A エレメントのコレクション interface HTMLDocument : Document { readonly attribute HTMLCollection anchors; }; | W3C(DOM1) | 
| applets IE4.0 NS3.0 | APPLET オブジェクトのコレクション interface HTMLDocument : Document { readonly attribute HTMLCollection applets; }; | W3C(DOM1) | 
| childNodes IE5 NS6 | HTML エレメントのコレクション interface Node { Node cloneNode(in boolean deep) raises(DOMException); }; | W3C(DOM1) | 
| embeds IE4.0 NS3.0 | EMBED エレメントのコレクション | W3C | 
| forms IE3.02 NS3.0 | FORM エレメントのコレクション interface HTMLDocument : Document { readonly attribute HTMLCollection forms; }; | W3C(DOM1) | 
| frames IE3.02 NS | window オブジェクトのコレクション | W3C | 
| images IE4.0 NS3.0 | IMAGE エレメントのコレクション ※ handleEventメソッドはNS4.0以降interface HTMLDocument : Document { readonly attribute HTMLCollection images; }; | W3C(DOM1) | 
| layers IE NS4.0-4.7 | レイヤーへのオブジェクト参照 | W3C | 
| links IE3.02 NS2.0 | A , AREA (HREF属性) エレメントのコレクション ※ onMouseOutイベントはNS3.0以降※ AreaオブジェクトはNS3.0以降※ handleEventメソッドはNS4.0以降interface HTMLDocument : Document { readonly attribute HTMLCollection links; }; | W3C(DOM1) | 
| plugins IE4.0 NS3.0 | embeds コレクションのエイリアス | W3C | 
| scripts IE4.0 NS | SCRIPT エレメントのコレクション | W3C | 
| styleSheets IE4.0 NS6 | styleSheets オブジェクトのコレクション | W3C | 
| interface HTMLDocument : Document {
           attribute DOMString        title;
  readonly attribute DOMString        referrer;
  readonly attribute DOMString        domain;
  readonly attribute DOMString        URL;
           attribute HTMLElement      body;
  readonly attribute HTMLCollection   images;
  readonly attribute HTMLCollection   applets;
  readonly attribute HTMLCollection   links;
  readonly attribute HTMLCollection   forms;
  readonly attribute HTMLCollection   anchors;
           attribute DOMString        cookie;
  void               open();
  void               close();
  void               write(in DOMString text);
  void               writeln(in DOMString text);
  Element            getElementById(in DOMString elementId);
  NodeList           getElementsByName(in DOMString elementName);
}; |