本文
介绍了Javascript实现在标题栏上
显示当前
日期的
方法,供大家
参考,具体实现方法如下:
复制代码代码如下所示:
<!——
写的
函数(){
/ / getdate
var现在=新日期();
VaR天=新的数组('sunday ','monday ','tuesday ','wednesday ','星期四',周五,'saturday);
VaR月=新的数组('january ','february ','march '四',愿,6月,'july ','august。
var date =((now.getdate()<10)0 )+ now.getdate();
/ / quadyear
函数2000(数字){返回(数字< 1000)编号+ 1900:数字;}
/ / glueit
今天now.getday =天{()} ++
月now.getmonth(){ } +
日期+
(Y2K(now.getyear()));
如果(document.all | |
文件。getElementById){ / /
浏览器
检查 document.title = today.tostring();
其他{ }
self.status = today.tostring(
默认); / /状态。
}
}
写();
希望本文能对大家的javascript
程序设计有所帮助。