document.title=" this is my new title ";
Demo of managing title of a page
<html>
<head>
<title></title>
<script type="text/javascript">
function change_title(){
document.title=document.getElementById("t1").value;
}
</script>
</head>
<body>
<form name=f1 method=post>
<input type=text name=t1 id="t1">
<input type=button onClick='change_title()'; value='Change Title'>
</form>
</body>
</html>
<html>
<head>
<title>Original title ends</title>
<script type="text/javascript">
function change_title(keyEvent){
//alert(keyEvent);
keyEvent = (keyEvent) ? keyEvent: window.event;
input = (keyEvent.target) ? keyEvent.target :
keyEvent.srcElement;
if(keyEvent.type=="keyup"){
if(input.value){
document.title=document.getElementById("t1").value;
}
}
</script>
</head>
<body>
<form name=f1 method=post>
<input type=text name=t1 id="t1" onkeyup='change_title(event)';>
</form>
</body>
</html>
NASIR | 27-11-2013 |
HI I VANT OFFLINE IN THE SITE IF YOU SEND OFFLINE SITE TANKS FOR YOU |