制作网页中显示的日期


 简单的显示系统年月日的脚本。

制作方法:
在<body>标签相应位置,粘贴代码:
<script language="JavaScript">
<!--
tmpDate = new Date();
date = tmpDate.getDate();
month= tmpDate.getMonth() + 1 ;
year= tmpDate.getYear();
document.write(year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
// -->
</script>

本文作者:

 简单的显示系统年月日的脚本。

制作方法:
在<body>标签相应位置,粘贴代码:
<script language="JavaScript">
<!--
tmpDate = new Date();
date = tmpDate.getDate();
month= tmpDate.getMonth() + 1 ;
year= tmpDate.getYear();
document.write(year);
document.write("年");
document.write(month);
document.write("月");
document.write(date);
document.write("日");
// -->
</script>

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3