Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q262 How can I set the document title?

irt.org | Knowledge Base | JavaScript | Document | Q262 [ previous next ]

Q262 How can I set the document title?

The documents title property is read only. You can only set it once. However you can use JavaScript to set its initial value:

<html>
<head>
<script language="JavaScript"><!--
document.write('<title>This is *my* title<\/title>')
//--></script>
</head>
<body>
</body>
</html>

Paul Fazio writes:

In Internet Explorer 5.x (I haven't tried it in Internet Explorer 4.x yet) you can use:

document.title = "Your new title";

to place the date and time in the title bar, and even to create a real time clock in the title bar by updating the title every second.

Feedback on 'Q262 How can I set the document title?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.