HTMLDOMマップオブジェクト
マップオブジェクト
Mapオブジェクトは、HTMLの<map>要素を表します。
マップオブジェクトにアクセスする
getElementById()を使用して、<map>要素にアクセスできます。
例
var x = document.getElementById("myMap");
マップオブジェクトを作成する
document.createElement()メソッドを使用して、<map>要素を作成できます。
例
var x = document.createElement("MAP");
マップオブジェクトコレクション
Collection | Description |
---|---|
areas | Returns a collection of all <area> elements in an image-map |
images | Returns a collection of all <img> and <object> elements associated with the image-map |
マップオブジェクトのプロパティ
Property | Description |
---|---|
name | Sets or returns the value of the name attribute of an image-map |
標準のプロパティとイベント
Mapオブジェクトは、標準のプロパティとイベントもサポートしています。
関連ページ
HTML DOMリファレンス:エリアオブジェクト
HTMLリファレンス:HTML <map>タグ
HTMLリファレンス:HTML <area>タグ