实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<p>VBScripts' function <b>MonthName</b> is used to get a month:</p>
6
<script type="text/vbscript">
7
document.write("<p>")
8
document.write(MonthName(1))
9
document.write("<br>")
10
document.write(MonthName(2))
11
document.write("</p><p>")
12
13
document.write("Here is how you get the abbreviated name of a month:")
14
document.write("<br>")
15
document.write(MonthName(1,True))
16
document.write("<br>")
17
document.write(MonthName(2,True))
18
document.write("</p><p>")
19
20
document.write("Here is how you get the current month:")
21
document.write("<br>")
22
document.write(MonthName(Month(Date)))
23
document.write("<br>")
24
document.write(MonthName(Month(Date),True))
25
document.write("</p>")
26
</script>
27
28
</body>
29
</html>