HTMLDOMベースオブジェクト
ベースオブジェクト
Baseオブジェクトは、HTMLの<base>要素を表します。
ベースオブジェクトにアクセスする
getElementById()を使用して、<base>要素にアクセスできます。
例
var x = document.getElementById("myBase");
ベースオブジェクトを作成する
document.createElement()メソッドを使用して、<base>要素を作成できます。
例
var x = document.createElement("BASE");
基本オブジェクトのプロパティ
Property | Description |
---|---|
href | Sets or returns the value of the href attribute in a base element |
target | Sets or returns the value of the target attribute in a base element |
標準のプロパティとイベント
Baseオブジェクトは、標準のプロパティとイベントもサポートします。
関連ページ
HTMLリファレンス:HTML <base>タグ