Assign value to the document title (you must have the title tag in your html document) : title : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » title »

 

Assign value to the document title (you must have the title tag in your html document)

















<html>
<head>
<title>Untitled</title>

<script language="javascript" type="text/javascript">

function changeTitle()
{
    var newTitle = prompt("A title.""default title");
    window.document.title = newTitle;
}

</script>
</head>

<body>

<P>You can change <a href="javascript:changeTitle()">
the &lt;title&gt; element</a> on this page</p>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» title