HTMLDOMメタオブジェクト
メタオブジェクト
Metaオブジェクトは、HTMLの<meta>要素を表します。
メタオブジェクトにアクセスする
getElementsByTagName()を使用して、<meta>要素にアクセスできます。
var x = document.getElementsByTagName("META")[0];
メタオブジェクトを作成する
document.createElement()メソッドを使用して、<meta>要素を作成できます。
例
var x = document.createElement("META");
メタオブジェクトのプロパティ
Property | Description |
---|---|
content | Sets or returns the value of the content attribute of a meta element |
httpEquiv | Sets or returns an HTTP header for the information in the content attribute |
name | Sets or returns a name for the information in the content attribute |
scheme | Not supported in HTML5. Sets or returns how the value of the content attribute should be interpreted |
標準のプロパティとイベント
メタオブジェクトは、標準のプロパティとイベントもサポートしています。
関連ページ
HTMLリファレンス:HTML <meta>タグ