→Tags:函数 学习 the document.write Date WeekdayName 星期 ←
The WeekdayName function returns the weekday name of a specified day of the week. Can take the following values:
WeekdayName 函数可以返回一个字符串,表示星期中指定的某一天语法
WeekdayName(weekday[,abbreviate[,firstdayofweek]])
参数 描述 weekday Required. The number of the weekday
必选项。星期中某天的数值定义。各天的数值定义取决于 firstdayofweek 参数设置。abbreviate Optional. A Boolean value that indicates if the weekday name is to be abbreviated
可选项。Boolean 值,指明是否缩写表示星期各天的名称。如果省略, 默认值为 False,即不缩写星期各天的名称。firstdayofweek Optional. Specifies the first day of the week.
可选项。指明星期第一天的数值
可以使用下面这些值:实例 1
document.write(WeekdayName(3))
输出:
Monday
实例 2
document.write(Date & "<br />")
document.write(Weekday(Date) & "<br />")
document.write(WeekdayName(Weekday(Date)))输出:
10/22/2007
2
Monday实例 3
document.write(Date & "<br />")
document.write(Weekday(Date) & "<br />")
document.write(WeekdayName(Weekday(Date),true))输出:
10/22/2007
2
Mon


看图说事儿



精彩图文






热门建站供求
栏目排行
共有 0 位网友发表了评论 此处只显示部分留言 点击查看完整评论页面