この節は、HTML文書に特有のオブジェクトやメソッドを記述するために、第1水準コアAPIを拡張する。一般的に、階層的な文書構造や要素、属性を操作するために必要な機能はコア部分で見つかるであろう。この節で見つかるのは、HTMLで定義された特定の要素に依存する機能である。
HTML特有DOM APIの目標は、つぎのことである。
「DOM-0」という用語は、(公式に仕様化されているわけではないが)Netscape Navigator 3.0 および Microsoft Internet Explorer 3.0 によって提示されたHTML文書機能の混合物を指す。場合によっては、属性やメソッドが「DOM-0」との後方互換性のために組み込まれている。
コアDOMとHTML応用DOMとの間の鍵となる相違点は、HTML DOMは、よりスクリプトライタに適しており既存のモデルとの一貫性がある簡便メソッドやプロパティを多数露出していることである。多くの場合、これらの拡張はある定義済みのDTDの存在を信頼するので、一般的なDOMにとっては適切ではない。DOM1については、HTML 4.0 の transitional DTD と frameset DTD とが想定される。実装間の相互運用性は、これらのDTDで仕様化された要素や属性についてのみ保証される。
より明確に言うと、この文書は、HTMLのための以下の特化を組み込む。
DOM1は、CSS1を通して指定されたスタイルにアクセスしたり修正する機構を組み込んでいない。その上、HTML文書のためのイベントモデルも定義しない。この機能は、この仕様書の将来の水準で仕様化する計画である。
HTML DOMは、プロパティ、メソッド、イベント、集合体、データ型について、ある命名上の慣習に従う。すべての名前は、1語以上の英単語が結合されて単一の文字列となったものとして定義される。
プロパティおよびメソッド
プロパティ名やメソッド名は、先頭は小文字のキーワードで始まり、後続の単語はそれぞれ大文字で始まる。たとえば、ファイルが作成された日付といったような文書メタ情報を返すプロパティならば "fileDateCreated" と名付けられるであろう。ECMAScript バインディングでは、プロパティは、与えられたオブジェクトのプロパティとして露出される。Java では、プロパティは get メソッドや set メソッドを用いて露出される。
非HTML 4.0 インターフェイスおよび属性
以下に定義されているインターフェイスは、HTML 4.0 勧告で定義されている要素に直接に割り付けられるものがほとんどだが、それができないものもある。同様に、下記に列挙されている属性すべてがHTML 4.0 仕様書の中に対照物をもつとは限らない(もつけれども、スクリプト言語との衝突を避けるために名前をつけ直されているものもある)。HTML 4.0 仕様書へのリンクがあるインターフェイスや属性の定義は、そこに応当する要素や属性の定義をもっている。その他のものはすべて、便宜上、あるいは「DOM-0」実装との後方互換性のため、この仕様書によって追加されたものである。
HTMLCollection はノードのリストである。個別のノードは、通常の添え字、またはそのノードの name もしくは id 属性によってアクセスしてよい。注意:HTML DOMにおける集合体は生きているものと想定される。これは、基礎にある文書が変更されたときには自動的に更新されるという意味である。
interface HTMLCollection {
readonly attribute unsigned long length;
Node item(in unsigned long index);
Node namedItem(in DOMString name);
};
length
item
index
|
取って来るべきノードの添え字。添え字の最初は 0 である。 |
Node。添え字が範囲外である場合には null という値が返される。
namedItem
HTMLDocument は、HTML階層構造のルートであり、内容全体を保持するものである。階層構造へのアクセスを提供することだけでなく、文書からの一定セットの情報にアクセスするための簡便メソッドもいくつか提供する。
BODY 要素の応当プロパティの方が好まれるため、以下のプロパティは廃止予定とされる。
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);
};
title
TITLE 要素により指定された文書の表題。
referrer
domain
URL
body
BODY 内容のある文書では BODY 要素を返し、フレーム設定文書ではこれは最外 FRAMESET 要素を返す。
images
IMG 要素すべての集合体。後方互換性のため、ふるまいは IMG 要素に限定される。
applets
OBJECT 要素および APPLET 要素(廃止予定)のすべての集合体。
links
href 属性の値をもった AREA 要素およびアンカー (A) 要素のすべての集合体。
forms
anchors
name 属性の値をもったアンカー (A) 要素すべての集合体。注意. 後方互換性のため、返されるアンカーのセットは name 属性をつけて作成されたアンカーだけを含み、id 属性をつけて作成されたものは含まない。
cookie
name=value;expires=data.
open
ライティングのための文書ストリームを開く。ターゲット内に文書が存在している場合には、このメソッドはそれを消去する。
このメソッドはパラメータをとらない。
このメソッドは何も返さない。
このメソッドは例外を発生させない。
close
open() によって開かれた文書ストリームを閉じ、レンダリングを強制する。write
open() によって開かれた文書ストリームへテキスト文字列を書き込む。テキストは、その文書の構造モデルの中へ解析される。
text
|
文書構造モデルの中のある構造へ解析されるべき文字列。 |
writeln
open() により開かれた文書ストリームへ、テキスト文字列に改行キャラクタが続いたものを書き込む。テキストは、その文書の構造モデルの中に解析される。
text
|
文書構造モデルの中のある構造へ解析されるべき文字列。 |
getElementById
id が elementid により与えられている Element を返す。そうした要素が存在しない場合は、null を返す。この id をもつ要素が2つ以上ある場合は、挙動は定義されない。
elementId
|
ある要素の一意的な |
getElementsByName
name 値が elementName により与えられている要素の集合体(空である場合もある)を返す。
elementName
|
要素の |
HTML属性は、要素オブジェクト上のプロパティとして露出される。露出されたプロパティの名前はつねに命名上の慣習を使い、ソース文書内の属性の大文字小文字の別には依存しない。プロパティのデータ型は、HTML 4.0 transitional DTD および frameset DTD によって決定される属性の型により決定される。属性はHTML 4.0 仕様書で与えられている意味論(大文字小文字の区別の有無を含む)をもつ。
属性は、「DOM-0」との互換性のため、プロパティとして露出される。XMLと将来のバージョンのHTMLとの両方に必須であることなのだが、これはすべてのあり得る属性名に一般化できないので、この利用は廃止予定である。我々は、属性を設定したり、取得したり、除去するためのコア Element インターフェイス上の通有的なメソッドを利用するすることを推奨する。
| DTD データ型 | オブジェクトモデルデータ型 |
| CDATA | DOMString |
| 値リスト(例. (left | right | center)) | DOMString |
| 一値の値リスト(例. (border)) | boolean |
| 数 | long int |
値リストであるデータ型をもつ属性の返り値は、ソース文書での値の大文字小文字の区別には無関係に、つねに大文字化される。たとえば、P 要素の align 属性の値が "left" である場合には、"Left" と返される。CDATA データ型の属性については、返り値の大文字小文字の区別はソース文書で与えられたものになる。
ネームスペースの衝突を避けるため、我々の選んだバインディング言語のうちのひとつにあるキーワードと同じ名前をもつ属性には、プレフィックスがつけられる。HTMLについては、使われるプレフィックスは "html" である。たとえば、LABAL 要素の for 属性は、ループ構築の命名上の慣習と衝突するので、htmlFOR と名前をつけ直される。
プロパティを通して露出される要素型名は、大文字である。たとえば、body 要素型名は、"tagName" プロパティを通すと "BODY" として露出される。
すべてのHTML要素インターフェイスは、このクラスから派生する。HTMLコア属性だけを露出する要素は、ベース HTMLElement インターフェイスによって表わされる。これらの要素は以下の通りである。
注意. このインターフェイスの style 属性は将来的な利用のために予約される。
interface HTMLElement : Element {
attribute DOMString id;
attribute DOMString title;
attribute DOMString lang;
attribute DOMString dir;
attribute DOMString className;
};
id
title
lang
dir
className
HTML文書のルート (root)。HTML 4.0 の HTML 要素の定義を見ること。
interface HTMLHtmlElement : HTMLElement {
attribute DOMString version;
};
version
文書ヘッダ情報。HTML 4.0 の HEAD 要素の定義を見ること。
interface HTMLHeadElement : HTMLElement {
attribute DOMString profile;
};
profile
LINK 要素は外部リソースへのリンクを指定し、この文書のその文書との関係(あるいはその逆)を定義する。HTML 4.0 の LINK 要素の定義を見ること。
interface HTMLLinkElement : HTMLElement {
attribute boolean disabled;
attribute DOMString charset;
attribute DOMString href;
attribute DOMString hreflang;
attribute DOMString media;
attribute DOMString rel;
attribute DOMString rev;
attribute DOMString target;
attribute DOMString type;
};
disabled
charset
href
hreflang
media
rel
rev
target
type
文書の表題。HTML 4.0 の TITLE 要素の定義を見ること。
interface HTMLTitleElement : HTMLElement {
attribute DOMString text;
};
text
これは文書についての通有的なメタ情報を内容とする。HTML 4.0 の META 要素の定義を見ること。
interface HTMLMetaElement : HTMLElement {
attribute DOMString content;
attribute DOMString httpEquiv;
attribute DOMString name;
attribute DOMString scheme;
};
content
httpEquiv
name
scheme
文書のベースURI。HTML 4.0 の BASE 要素の定義を見ること。
interface HTMLBaseElement : HTMLElement {
attribute DOMString href;
attribute DOMString target;
};
href
target
この要素は、単行テキスト入力のために使われる。HTML 4.0 の ISINDEX 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLIsIndexElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute DOMString prompt;
};
form
FORM 要素を返す。このコントロールがフォームの文脈の内部にない場合には null を返す。
prompt
スタイル情報。より詳細なスタイルシートオブジェクトモデルは、別文書で定義されることが予定されている。HTML 4.0 の STYLE 要素の定義を見ること。
interface HTMLStyleElement : HTMLElement {
attribute boolean disabled;
attribute DOMString media;
attribute DOMString type;
};
disabled
media
type
HTML文書の本体。タグがソース文書の中に存在しない場合であっても、この要素はDOM APIの中につねに存在する。HTML 4.0 の BODY 要素の定義を見ること。
interface HTMLBodyElement : HTMLElement {
attribute DOMString aLink;
attribute DOMString background;
attribute DOMString bgColor;
attribute DOMString link;
attribute DOMString text;
attribute DOMString vLink;
};
aLink
background
bgColor
link
text
vLink
FORM 要素は、集合体や要素に類似した挙動を含む。含まれている入力要素や、フォーム要素の属性への直接のアクセスを提供するのである。HTML 4.0 の FORM 要素の定義を見ること。
interface HTMLFormElement : HTMLElement {
readonly attribute HTMLCollection elements;
readonly attribute long length;
attribute DOMString name;
attribute DOMString acceptCharset;
attribute DOMString action;
attribute DOMString enctype;
attribute DOMString method;
attribute DOMString target;
void submit();
void reset();
};
elements
length
name
acceptCharset
action
enctype
method
target
submit
reset
選択要素は、オプションの選択を可能にする。含まれている選択肢は、集合体としての選択要素を通して直接にアクセスできる。HTML 4.0 の SELECT 要素の定義を見ること。
interface HTMLSelectElement : HTMLElement {
readonly attribute DOMString type;
attribute long selectedIndex;
attribute DOMString value;
readonly attribute long length;
readonly attribute HTMLFormElement form;
readonly attribute HTMLCollection options;
attribute boolean disabled;
attribute boolean multiple;
attribute DOMString name;
attribute long size;
attribute long tabIndex;
void add(in HTMLElement element,
in HTMLElement before);
void remove(in long index);
void blur();
void focus();
};
type
selectedIndex
value
length
SELECT の中にある選択肢の数。
form
FORM 要素を返す。この制御がフォームの文脈の内部に書かれていない場合には null を返す。
options
OPTION 要素の集合体。
disabled
multiple
SELECT の中では複数の OPTION 要素を選択してよい。HTML 4.0 の multiple 属性の定義を見ること。
name
size
tabIndex
add
SELECT の OPTION 要素の集合体に新しい要素を追加する。
element
|
追加すべき要素。 |
|
before
|
その前で挿入をなすべき要素。リストの先頭に挿入する場合には NULL。 |
remove
SELECT の OPTION 要素の集合体からある要素を取り除く。与えられた添え字が要素にない場合には、何もしない。
index
|
取り除くべき項目の添え字。 |
blur
focus
論理サブディビジョンの中に選択肢をグループ化する。HTML 4.0 の OPTGROUP 要素の定義を見ること。
interface HTMLOptGroupElement : HTMLElement {
attribute boolean disabled;
attribute DOMString label;
};
disabled
label
選択可能な選択。HTML 4.0 の OPTION 要素の定義を見ること。
interface HTMLOptionElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute boolean defaultSelected;
readonly attribute DOMString text;
attribute long index;
attribute boolean disabled;
attribute DOMString label;
readonly attribute boolean selected;
attribute DOMString value;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
defaultSelected
selected 属性の初期値をストアする。
text
index
SELECT におけるこの OPTION の添え字。
disabled
label
selected
value
フォーム制御。注意. ページが見られる環境次第では、ファイルアップロード入力型については値プロパティが読み出し専用である場合がある。"password" 入力型については、返される実際の値は、部外者の利用を防止するためにマスクされる場合がある。HTML 4.0 の INPUT 要素の定義を見ること。
interface HTMLInputElement : HTMLElement {
attribute DOMString defaultValue;
attribute boolean defaultChecked;
readonly attribute HTMLFormElement form;
attribute DOMString accept;
attribute DOMString accessKey;
attribute DOMString align;
attribute DOMString alt;
attribute boolean checked;
attribute boolean disabled;
attribute long maxLength;
attribute DOMString name;
attribute boolean readOnly;
attribute DOMString size;
attribute DOMString src;
attribute long tabIndex;
readonly attribute DOMString type;
attribute DOMString useMap;
attribute DOMString value;
void blur();
void focus();
void select();
void click();
};
defaultValue
value の初期値)をストアする。
defaultChecked
type が "Radio" または "Checkbox" という値をもつときは、checked 属性の初期値をストアする。
form
FORM 要素を返す。この制御がフォームの文脈の中にない場合には null を返す。
accept
accessKey
align
alt
checked
type が "Radio" または "Checkbox" という値をもつとき、ラジオボタンまたはチェックボックスがチェックされるかどうかを記述する。明示的に設定されている場合には、値は TRUE である。チェックボックスまたはラジオボタンの現在の状態を表わす。HTML 4.0 の checked 属性の定義を見ること。
disabled
maxLength
type が "Text" または "Password" という値をもつときの、テキストフィールドのキャラクタの最大数。HTML 4.0 の maxlength 属性の定義を見ること。
name
readOnly
type が "text" または "password" という値をもつときに限る。HTML 4.0 の readonly 属性の定義を見ること。
size
src
type 属性が "Image" という値をもつとき、この属性はグラフィカル送信ボタンを装飾するために使われる画像の位置を指定する。HTML 4.0 の src 属性の定義を見ること。
tabIndex
type
useMap
value
blur
focus
select
type 属性が以下の値のうちのひとつをとる INPUT 要素用。"Text", "File", "Password".click
type 属性が以下の値のうちのひとつをとる INPUT 要素用。"Button", "Checkbox", "Radio", "Reset", "Submit".複数行テキストフィールド。HTML 4.0 の TEXTAREA 要素の定義を見ること。
interface HTMLTextAreaElement : HTMLElement {
attribute DOMString defaultValue;
readonly attribute HTMLFormElement form;
attribute DOMString accessKey;
attribute long cols;
attribute boolean disabled;
attribute DOMString name;
attribute boolean readOnly;
attribute long rows;
attribute long tabIndex;
readonly attribute DOMString type;
attribute DOMString value;
void blur();
void focus();
void select();
};
defaultValue
value の初期値)をストアする。
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
accessKey
cols
disabled
name
readOnly
rows
tabIndex
type
value
blur
focus
select
TEXTAREA の内容を選択する。押しボタン。HTML 4.0 の BUTTON 要素の定義を見ること。
interface HTMLButtonElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute DOMString accessKey;
attribute boolean disabled;
attribute DOMString name;
attribute long tabIndex;
readonly attribute DOMString type;
attribute DOMString value;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
accessKey
disabled
name
tabIndex
type
value
フォームフィールドのラベルのテキスト。HTML 4.0 の LABEL 要素の定義を見ること。
interface HTMLLabelElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute DOMString accessKey;
attribute DOMString htmlFor;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
accessKey
htmlFor
id 属性により他のフォーム制御とリンクする。HTML 4.0 の for 属性の定義を見ること。
フォーム制御を論理的グループに組織する。HTML 4.0 の FIELDSET 要素の定義を見ること。
interface HTMLFieldSetElement : HTMLElement {
readonly attribute HTMLFormElement form;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
FIELDSET グループ化のための表題を提供する。HTML 4.0 の LEGEND 要素の定義を見ること。
interface HTMLLegendElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute DOMString accessKey;
attribute DOMString align;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
accessKey
align
FIELDSET との相対関係におけるテキストの配置。HTML 4.0 の align 属性の定義を見ること。HTML 4.0 では、この属性は廃止予定である。
順序なしリスト。HTML 4.0 の UL 要素の定義を見ること。
interface HTMLUListElement : HTMLElement {
attribute boolean compact;
attribute DOMString type;
};
compact
type
順序つきリスト。HTML 4.0 の OL 要素の定義を見ること。
interface HTMLOListElement : HTMLElement {
attribute boolean compact;
attribute long start;
attribute DOMString type;
};
compact
start
type
定義リスト。HTML 4.0 の DL 要素の定義を見ること。
interface HTMLDListElement : HTMLElement {
attribute boolean compact;
};
compact
ディレクトリリスト。HTML 4.0 の DIR 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLDirectoryElement : HTMLElement {
attribute boolean compact;
};
compact
メニューリスト。HTML 4.0 の MENU 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLMenuElement : HTMLElement {
attribute boolean compact;
};
compact
リストの項目。HTML 4.0 の LI 要素の定義を見ること。
interface HTMLLIElement : HTMLElement {
attribute DOMString type;
attribute long value;
};
type
value
OL の中で使われるとき、順番の番号を再設定する。HTML 4.0 の value 属性の定義を見ること。HTML 4.0 では、この属性は廃止予定である。
??? HTML 4.0 の BLOCKQUOTE 要素の定義を見ること。
interface HTMLBlockquoteElement : HTMLElement {
attribute DOMString cite;
};
cite
通有的ブロックコンテナ。HTML 4.0 の DIV 要素の定義を見ること。
interface HTMLDivElement : HTMLElement {
attribute DOMString align;
};
align
段落。HTML 4.0 の P 要素の定義を見ること。
interface HTMLParagraphElement : HTMLElement {
attribute DOMString align;
};
align
H1 ~ H6 要素を表わす。HTML 4.0 の H1 要素の定義を見ること。
interface HTMLHeadingElement : HTMLElement {
attribute DOMString align;
};
align
Q 要素および BLOCKQUOTE 要素を表わす。HTML 4.0 の Q 要素の定義を見ること。
interface HTMLQuoteElement : HTMLElement {
attribute DOMString cite;
};
cite
整形済みテキスト。HTML 4.0 の PRE 要素の定義を見ること。
interface HTMLPreElement : HTMLElement {
attribute long width;
};
width
改行を強制する。HTML 4.0 の BR 要素の定義を見ること。
interface HTMLBRElement : HTMLElement {
attribute DOMString clear;
};
clear
ベースフォント。HTML 4.0 の BASEFONT 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLBaseFontElement : HTMLElement {
attribute DOMString color;
attribute DOMString face;
attribute DOMString size;
};
color
face
size
局所的なフォント変更。HTML 4.0 の FONT 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLFontElement : HTMLElement {
attribute DOMString color;
attribute DOMString face;
attribute DOMString size;
};
color
face
size
水平線を作成する。HTML 4.0 の HR 要素の定義を見ること。
interface HTMLHRElement : HTMLElement {
attribute DOMString align;
attribute boolean noShade;
attribute DOMString size;
attribute DOMString width;
};
align
noShade
size
width
文書の一部の修正の表示。HTML 4.0 の INS 要素および DEL 要素の定義を見ること。
interface HTMLModElement : HTMLElement {
attribute DOMString cite;
attribute DOMString dateTime;
};
cite
dateTime
アンカー要素。HTML 4.0 の A 要素の定義を見ること。
interface HTMLAnchorElement : HTMLElement {
attribute DOMString accessKey;
attribute DOMString charset;
attribute DOMString coords;
attribute DOMString href;
attribute DOMString hreflang;
attribute DOMString name;
attribute DOMString rel;
attribute DOMString rev;
attribute DOMString shape;
attribute long tabIndex;
attribute DOMString target;
attribute DOMString type;
void blur();
void focus();
};
accessKey
charset
coords
shape も見ること。HTML 4.0 の coords 属性の定義を見ること。
href
hreflang
name
rel
rev
shape
coords によって与えられる。HTML 4.0 の shape 属性の定義を見ること。
tabIndex
target
type
blur
focus
埋め込まれた画像。HTML 4.0 の IMG 要素の定義を見ること。
interface HTMLImageElement : HTMLElement {
attribute DOMString lowSrc;
attribute DOMString name;
attribute DOMString align;
attribute DOMString alt;
attribute DOMString border;
attribute DOMString height;
attribute DOMString hspace;
attribute boolean isMap;
attribute DOMString longDesc;
attribute DOMString src;
attribute DOMString useMap;
attribute DOMString vspace;
attribute DOMString width;
};
lowSrc
name
align
alt
border
height
hspace
isMap
longDesc
src
useMap
vspace
width
通有的な埋め込みオブジェクト。注意. 主として、オブジェクト要素上のプロパティはすべて読み書き可能であるが、一定の環境では一定のプロパティが、基礎にあるオブジェクトが一旦インスタンス化されれば読み出し専用になる場合がある。HTML 4.0 の OBJECT 要素の定義を見ること。
interface HTMLObjectElement : HTMLElement {
readonly attribute HTMLFormElement form;
attribute DOMString code;
attribute DOMString align;
attribute DOMString archive;
attribute DOMString border;
attribute DOMString codeBase;
attribute DOMString codeType;
attribute DOMString data;
attribute boolean declare;
attribute DOMString height;
attribute DOMString hspace;
attribute DOMString name;
attribute DOMString standby;
attribute long tabIndex;
attribute DOMString type;
attribute DOMString useMap;
attribute DOMString vspace;
attribute DOMString width;
};
form
FORM 要素を返す。この制御がフォームの文脈内にない場合には null を返す。
code
code 属性を見ること。
align
archive
border
codeBase
classid, data, archive 属性のためのベースURI。HTML 4.0 の codebase 属性の定義を見ること。
codeType
classid 属性を経由してダウンロードされるデータの内容型。HTML 4.0 の codetype 属性の定義を見ること。
data
declare
height
hspace
name
standby
tabIndex
type
data 属性を経由してダウンロードされるデータの内容型。HTML 4.0 の type 属性の定義を見ること。
useMap
vspace
width
OBJECT 要素にフィードされるパラメータ。HTML 4.0 の PARAM 要素の定義を見ること。
interface HTMLParamElement : HTMLElement {
attribute DOMString name;
attribute DOMString type;
attribute DOMString value;
attribute DOMString valueType;
};
name
type
valuetype が "ref" という値をもつとき、value 属性の内容型。HTML 4.0 の type 属性の定義を見ること。
value
valueType
value 属性値の意味についての情報。HTML 4.0 の valuetype 属性の定義を見ること。
埋め込み Java アプレット。HTML 4.0 の APPLET 要素の定義を見ること。HTML 4.0 では、この要素は廃止予定である。
interface HTMLAppletElement : HTMLElement {
attribute DOMString align;
attribute DOMString alt;
attribute DOMString archive;
attribute DOMString code;
attribute DOMString codeBase;
attribute DOMString height;
attribute DOMString hspace;
attribute DOMString name;
attribute DOMString object;
attribute DOMString vspace;
attribute DOMString width;
};
align
alt
archive
code
codeBase
height
hspace
name
object
vspace
width
クライアント側イメージマップ。HTML 4.0 の MAP 要素の定義を見ること。
interface HTMLMapElement : HTMLElement {
readonly attribute HTMLCollection areas;
attribute DOMString name;
};
areas
name
usemap で使うためのもの)。HTML 4.0 の name 属性の定義を見ること。
クライアント側イメージマップの領域定義。HTML 4.0 の AREA 要素の定義を見ること。
interface HTMLAreaElement : HTMLElement {
attribute DOMString accessKey;
attribute DOMString alt;
attribute DOMString coords;
attribute DOMString href;
attribute boolean noHref;
attribute DOMString shape;
attribute long tabIndex;
attribute DOMString target;
};
accessKey
alt
coords
shape も見ること。HTML 4.0 の coords 属性の定義を見ること。
href
noHref
shape
coords によって与えられる。HTML 4.0 の shape 属性の定義を見ること。
tabIndex
target
スクリプト命令。HTML 4.0 の SCRIPT 要素の定義を見ること。
interface HTMLScriptElement : HTMLElement {
attribute DOMString text;
attribute DOMString htmlFor;
attribute DOMString event;
attribute DOMString charset;
attribute boolean defer;
attribute DOMString src;
attribute DOMString type;
};
text
htmlFor
event
charset
defer
src
type
テーブルの creat* メソッドや delete* メソッドは、制作者がテーブルを構築したり修正したりできるようにする。HTML 4.0 は、テーブル内で存在してよいのは CAPTION, THEAD, TFOOT それぞれについて1つだけと規定する。したがって、ひとつ存在し、createTHead() メソッドまたは creatTFoot() メソッドが呼ばれる場合には、メソッドは既存の THead 要素または TFoot 要素を返す。HTML 4.0 の TABLE 要素の定義を見ること。
interface HTMLTableElement : HTMLElement {
attribute HTMLTableCaptionElement caption;
attribute HTMLTableSectionElement tHead;
attribute HTMLTableSectionElement tFoot;
readonly attribute HTMLCollection rows;
readonly attribute HTMLCollection tBodies;
attribute DOMString align;
attribute DOMString bgColor;
attribute DOMString border;
attribute DOMString cellPadding;
attribute DOMString cellSpacing;
attribute DOMString frame;
attribute DOMString rules;
attribute DOMString summary;
attribute DOMString width;
HTMLElement createTHead();
void deleteTHead();
HTMLElement createTFoot();
void deleteTFoot();
HTMLElement createCaption();
void deleteCaption();
HTMLElement insertRow(in long index);
void deleteRow(in long index);
};
caption
CAPTION を返す。存在しない場合には void を返す。
tHead
THEAD を返す。存在しない場合には null を返す。
tFoot
TFOOT を返す。存在しない場合には null を返す。
rows
THEAD, TFOOT, TBODY の中のものや TBODY 要素すべてを含めて、テーブル内のすべての行の集合体を返す。
tBodies
align
bgColor
border
cellPadding
cellSpacing
frame
rules
summary
width
createTHead
THEAD).
deleteTHead
createTFoot
TFOOT)。
deleteTFoot
createCaption
CAPTION 要素。
deleteCaption
insertRow
index
|
新しい行を挿入すべき場所の行番号。 |
deleteRow
index
|
削除すべき行の添え字。 |
テーブルの表題。HTML 4.0 の CAPTION 要素の定義を見ること。
interface HTMLTableCaptionElement : HTMLElement {
attribute DOMString align;
};
align
COL や COLGROUP 要素をグループ化し直す。HTML 4.0 の COL 要素の定義を見ること。
interface HTMLTableColElement : HTMLElement {
attribute DOMString align;
attribute DOMString ch;
attribute DOMString chOff;
attribute long span;
attribute DOMString vAlign;
attribute DOMString width;
};
align
ch
chOff
span
vAlign
width
THEAD, TFOOT, TBODY 要素。
interface HTMLTableSectionElement : HTMLElement {
attribute DOMString align;
attribute DOMString ch;
attribute DOMString chOff;
attribute DOMString vAlign;
readonly attribute HTMLCollection rows;
HTMLElement insertRow(in long index);
void deleteRow(in long index);
};
align
align 属性を見ること。
ch
chOff
vAlign
valign 属性を見ること。
rows
insertRow
index
|
新しい行を挿入すべき場所の行番号。 |
deleteRow
index
|
削除すべき行の添え字。 |
テーブルの行。HTML 4.0 の TR 要素の定義を見ること。
interface HTMLTableRowElement : HTMLElement {
attribute long rowIndex;
attribute long sectionRowIndex;
attribute HTMLCollection cells;
attribute DOMString align;
attribute DOMString bgColor;
attribute DOMString ch;
attribute DOMString chOff;
attribute DOMString vAlign;
HTMLElement insertCell(in long index);
void deleteCell(in long index);
};
rowIndex
sectionRowIndex
THEAD, TFOOT, TBODY).
cells
align
bgColor
ch
chOff
vAlign
insertCell
TD を挿入する。
index
|
セルを挿入するべき場所。 |
deleteCell
index
|
削除するべきセルの添え字。 |
TH 要素および TD 要素を表わすために使われるオブジェクト。HTML 4.0 の TD 要素の定義を見ること。
interface HTMLTableCellElement : HTMLElement {
attribute long cellIndex;
attribute DOMString abbr;
attribute DOMString align;
attribute DOMString axis;
attribute DOMString bgColor;
attribute DOMString ch;
attribute DOMString chOff;
attribute long colSpan;
attribute DOMString headers;
attribute DOMString height;
attribute boolean noWrap;
attribute long rowSpan;
attribute DOMString scope;
attribute DOMString vAlign;
attribute DOMString width;
};
cellIndex
abbr
align
axis
bgColor
ch
chOff
colSpan
headers
id 属性値のリスト。HTML 4.0 の headers 属性の定義を見ること。
height
noWrap
rowSpan
scope
vAlign
width
フレームのグリッドを作成する。HTML 4.0 の FRAMESET 要素の定義を見ること。
interface HTMLFrameSetElement : HTMLElement {
attribute DOMString cols;
attribute DOMString rows;
};
cols
rows
フレームを作成する。HTML 4.0 の FRAME 要素の定義を見ること。
interface HTMLFrameElement : HTMLElement {
attribute DOMString frameBorder;
attribute DOMString longDesc;
attribute DOMString marginHeight;
attribute DOMString marginWidth;
attribute DOMString name;
attribute boolean noResize;
attribute DOMString scrolling;
attribute DOMString src;
};
frameBorder
longDesc
marginHeight
marginWidth
name
target 属性のオブジェクト)。HTML 4.0 の name 属性の定義を見ること。
noResize
scrolling
src
インラインのサブウィンドウ。HTML 4.0 の IFRAME 要素の定義を見ること。
interface HTMLIFrameElement : HTMLElement {
attribute DOMString align;
attribute DOMString frameBorder;
attribute DOMString height;
attribute DOMString longDesc;
attribute DOMString marginHeight;
attribute DOMString marginWidth;
attribute DOMString name;
attribute DOMString scrolling;
attribute DOMString src;
attribute DOMString width;
};
align
frameBorder
height
longDesc
marginHeight
marginWidth
name
target 属性のオブジェクト)。HTML 4.0 の name 属性の定義を見ること。
scrolling
src
width