<
html
>
<
head
>
<
title
>
测试网页
</
title
>
</
head
>
<
body
>
<
script
>
var
myYr
=
"
2006
"
;
var
myMonth
=
"
4
"
;
var
myDate
=
"
11
"
;
var
strWeek
=
"
星期
"
+
"
日一二三四五六
"
.charAt(
new
Date(myYr,myMonth
-
1
,myDate).getDay());
alert(strWeek);
</
script
>
</
body
>
</
html
>
我们的4月就是老外的3月啊,所以要想获得4月的月份,就先要减去1