A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/dom/HTMLTitleElement/text below:

text · WebPlatform Docs

text Summary

Legacy. Use document.title instead. When setting, does same as textContent. When getting, gets a concatenated version of all of the child text nodes of a title element.

Property of dom/HTMLTitleElementdom/HTMLTitleElement

Syntax
var titleText = titleElement.text;
titleElement.text = newTitleText;
Return Value

Returns an object of type StringString

A concatenation of all of the child text nodes of the element.

Examples

The following script gets the text of the title element, changes “r” to “t” and sets the text back.





var title = document.getElementsByTagName("title")[0];




title.text = title.text.replace("r", "t");
Usage
 Legacy. Use document.title instead.

Use this property to get a concatenated version of all of the child text nodes of a title element. Setting this property works the same way as setting the textContent property.

Notes Related specifications
Document Object Model (DOM) Level 1
W3C Recommendation
Document Object Model (DOM) Level 2 HTML
W3C Recommendation
WHATWG HTML
Living Standard
HTML5
W3C Last Call Working Draft

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4