在IE标题栏显示日期时间的JS代码
【以稿换稿 】 作者:佚名 发布:2016年06月22日 阅读: 次
可以让时间、日期显示在你网页的标题栏,很个性的功能,其实代码很简单,看了就会,也很好调用。
<title>网页标题栏显示时间</title>
<script language="JavaScript">
var isMonth = new
Array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
var isDay = new
Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");
today = new Date () ;
Year=today.getYear();
Date=today.getDate();
if (document.all)
document.title="今天是: "+Year+"年"+isMonth[today.getMonth()]+Date+"日"+isDay[today.getDay()]
</script>
【来源:互联网络】
- 上一篇:将前台默认显示每页多少信息在后台和文件中进行修改
- 下一篇:显示当前时间代码六种
用户评论
(以下评论仅代表网友意见,与本站立场无关)