<!DOCTYPE html>
<html>
<head>
<title>jb51.net</title>
</head>
<body>
current document's title is:
<script>
document.write(document.title);
</script>
</body>
</html>
在ie6和ff2.0下测试通过。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>标题一</title>
</head>
<body>
<script type="text/javascript">
<!--
var t=document.title;
alert(t);
document.title="改变的标题二";
//-->
</script>
</body>
</html>