为什么运行不出来了??把它放到前面又可以??
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document</title>
<script type="text/javascript">
document.write("2.字符串" + "<br>");
//2.字符串
var message = "I love JavaScript!";
var mychar = message.toUpperCase();
document.write("字符串为:" + mychar + "<br>");
document.write("二、内置对象" + "<br>");
document.write("1.日期" + "<br>")
var mydate = new Date();
document.write("当前时间:" + mydate + "<br>");
mydate.setTime(mydate.getTime() + 60 * 60 * 1000);
document.write("推迟一小时时间:" + mydate + "<br>");
var myyydate = new Date();
document.write("当前时间:" + myyydate + "<br>");
myyydate.setTime(myyydate.getTime() + 2 * 60 * 60 * 1000);
document.write("推迟二小时时间:" + myyydate);
//日期
var mydate = new Date();
var myyear = myday.getFullYear();
var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
document.write("年份" + myyear);
document.write("今天是:" + weekday[mydate.getDay()]);
var mydate = new Date(); //当前时间2014年3月6日
document.write(mydate + "<br>"); //输出当前时间
document.write(mydate.getFullYear() + "<br>"); //输出当前年份
mydate.setFullYear(81); //设置年份
document.write(mydate + "<br>"); //输出年份被设定为 0081年。
/*1.结果格式依次为:星期、月、日、年、时、分、秒、时区。(火狐浏览器)*/
var mese = "I love JavaScript!";
var mych = mese.toUpperCase();
document.write("字符串为:" + mych + "<br>");
</script>
</head>
<body>
</body>
</html>