You are here: Reference > JavaScript > client-side > HTML DOM > properties > title (document, XMLDocument)
title property (document, XMLDocument)
Sets or returns the title of the current document.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
Possible values:
String that sets or retrieves the title.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the title property:
|
||||
<head> <script type="text/javascript"> function ChangeTitle () { document.title = "The new title of the document."; } </script> </head> <body> <button onclick="ChangeTitle ();">Change document title!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments