改窗口的标题,,改了,,但一涮新又回来了,,,为什么help!
<html>
<head>
<title>leftright</title>
<script language=javascript>
function changetitle(x){
if(x==1){
document.title="FlashMagic";
window.alert(document.title);
}else if(x==2){
document.title="onegenius";
window.alert(document.title);
}else{
document.title="leftright";
window.alert(document.title);
}
}
</script>
</head>
<body>
<form name="form1" method="post">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Enter" onClick="changetitle(form1.textfield.value)">
</form>
</body>
</html>