タイトルテキストプロパティ
例
ドキュメントのタイトルのテキストを返します。
var x = document.getElementsByTagName("TITLE")[0].text;
定義と使用法
textプロパティは、ドキュメントのタイトルのテキストを設定または返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
text | Yes | Yes | Yes | Yes | Yes |
構文
textプロパティを返します。
titleObject.text
textプロパティを設定します。
titleObject.text = text
プロパティ値
Value | Description |
---|---|
text | Specifies the text of the document's title |
技術的な詳細
戻り値: | ドキュメントのタイトルのテキストを表す文字列 |
---|
その他の例
例
ドキュメントのタイトルのテキストを変更します。
document.getElementsByTagName("TITLE")[0].text = "A new title text..";
❮タイトルオブジェクト