function DateDemo()
{
var d, day, x, s = "Today is: ";
var x = new Array("Sunday", "Monday", "Tuesday");
var x = x.concat("Wednesday","Thursday", "Friday");
var x = x.concat("Saturday");
d = new Date();
day = d.getDay();
return(s += x[day]);
}
(3)getHouse函数:返回日期的"小时"部分,值为0~23。例。
复制代码 代码如下: