> VB语言在线手册 > 显示星期
<!DOCTYPE HTML>
<html>
<body>

<p>VBScripts' function <b>WeekdayName</b> is used to get a weekday:</p>
<script type="text/vbscript">
document.write("<p>")
document.write(WeekDayName(1))
document.write("<br>")
document.write(WeekDayName(2))
document.write("</p><p>")

document.write("Get the abbreviated name of a weekday:")
document.write("<br>")
document.write(WeekDayName(1,True))
document.write("<br>")
document.write(WeekDayName(2,True))
document.write("</p><p>")

document.write("Get the current weekday:")
document.write("<br>")
document.write(WeekdayName(weekday(Date)))
document.write("<br>")
document.write(WeekdayName(weekday(Date), True))
document.write("</p>")
</script>

</body>
</html>










			
上一篇:
下一篇: