その他のオブジェクト
- リンクオブジェクト(Link)
- window.document.links
- window.document.links.length
- window.document.links[n]
- window.document.link.href
- window.document.link.protocol
- window.document.link.host
- window.document.link.hostname
- window.document.link.port
- window.document.link.pathname
- window.document.link.search
- window.document.link.hash
- window.document.link.target
- window.document.link.text
- window.document.link.handleEvent(event)
- アプレットオブジェクト(Applet)
- MIMEタイプオブジェクト(MimeType)
- プラグインオブジェクト(Plugin)
- スクリーンオブジェクト(Screen)
リンクオブジェクト(Link)
window.document.links
window.document.links.length
window.document.links[n]
links はこのドキュメントに含まれるリンクオブジェクト(<a href="~">~</a> に相当)の配列、length はその個数を示します。個々のオブジェクトは links[n] で参照します。
window.document.link.href
<a href="○○">△△</a> の ○○ の部分を示します。
window.document.link.protocol
window.document.link.host
window.document.link.hostname
window.document.link.port
window.document.link.pathname
window.document.link.search
window.document.link.hash
href の値が http://www.yyy.zzz:8000/aaa/bbb/ccc.cgi?KEY=CGI#XYZ だとすると、protocol は http:、host は www.yyy.zzz:8000、hostname は www.yyy.zzz、port は 8000、pathname は /aaa/bbb/ccc.cgi、search は ?KEY=CGI、hash は #XYZ の部分を示す文字列となります。
window.document.link.target
<a target="...">で指定したターゲットを示します。
window.document.link.text
<a href="○○">△△</a> の △△ の部分を示します。Internet Explorer の場合は text の代わりに innerText を用いて得ることができます。
window.document.link.handleEvent(event)
リンクのイベントハンドラを呼び出します。Netscape Navigator でのみサポートされていました。他のブラウザではサポートされていません。
アプレットオブジェクト(Applet)
window.document.applets
window.document.applets.length
window.document.applets[n]
applets はこのドキュメントに含まれるアプレットオブジェクト(<applet> に相当)の配列、length はその個数を示します。個々のオブジェクトは applets[n] で参照します。
MIMEタイプオブジェクト(MimeType)
window.navigator.mimeTypes
window.navigator.mimeTypes.length
window.navigator.mimeTypes[n]
mimeTypes はこのブラウザがサポートする MIME タイプの一覧、length はその個数を示します。個々のオブジェクトは mimeTypes[n] で参照します。
window.navigator.mimeType.type
window.navigator.mimeType.description
window.navigator.mimeType.enabledPlugin
window.navigator.mimeType.suffixes
type は "image/gif" などの MIMEタイプ名、description はMIMEタイプの説明を示す文字列、enabledPlugin はMIMEタイプに対応するプラグインを示すオブジェクト、suffixes は "dir" や "dir, dxr, dcr" などのような、プラグインに割り付けられた拡張子を示す文字列を示します。
プラグインオブジェクト(Plugin)
window.navigator.plugins
window.navigator.plugins.length
window.navigator.plugins[n]
plugins はこのブラウザがサポートするプラグインに関するプラグインオブジェクトの配列、length はその個数を示します。個々のオブジェクトは plugins[n] で参照します。
window.navigator.plugin.name
window.navigator.plugin.description
window.navigator.plugin.filename
このプラグインに関して、name は名前、description は説明、file はファイル名を示します。
window.navigator.plugin.length
window.document.plugin[n]
このプラグインに関連する MIME タイプの個数と、ここの MIME タイプオブジェクトを示します。
スクリーンオブジェクト(Screen)
window.screen
スクリーンに関する情報を保持するオブジェクト。
window.screen.width
window.screen.height
window.screen.availWidth
window.screen.availHeight
width と height は、640×480、800×600、1024×768 などのモニタの広さを示します。availWidth と availHeight はモニタの有効範囲の広さ(Windows ではタスクバーを除いた部分の広さ)を示します。
window.screen.colorDepth
window.screen.pixelDepth
window.screen.bufferDepth
それぞれ、カラーパレットの色を表すために必要なビット数、スクリーンの1ピクセルの色を表すために必要なビット数、バッファ中画像の1ピクセルの色を表すために必要なビット数を示します。
window.screen.updateInterval
画面を再描画する際のインターバルを1000分の1秒単位で示します。