非常漂亮带时钟的台历
当前位置:点晴教程→知识管理交流
→『 技术文档交流 』
[code]
第一步:把如下代码加入区域中:
第二步:把如下代码加入区域中:
<script language=javascript>
function year_month(){
var now = new date();
var yy = now.getyear();
var mm = now.getmonth()+1;
var cl = '';
if (now.getday() == 0) cl = '';
if (now.getday() == 6) cl = '';
return(cl + yy + '年' + mm + '月'); }
function date_of_today(){
var now = new date();
var cl = '';
if (now.getday() == 0) cl = '';
if (now.getday() == 6) cl = '';
return(cl + now.getdate() + ''); }
function day_of_today(){
var day = new array();
day[0] = "星期日";
day[1] = "星期一";
day[2] = "星期二";
day[3] = "星期三";
day[4] = "星期四";
day[5] = "星期五";
day[6] = "星期六";
var now = new date();
//作者:qpsh.com 网页特效
var cl = '';
if (now.getday() == 0) cl = '';
if (now.getday() == 6) cl = '';
return(cl + day[now.getday()] + ''); }
function curenttime(){
var now = new date();
var hh = now.gethours();
var mm = now.getminutes();
var ss = now.gettime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock); }
function refreshcalendarclock(){
document.all.calendarclock1.innerhtml = year_month();
document.all.calendarclock2.innerhtml = date_of_today();
document.all.calendarclock3.innerhtml = day_of_today();
document.all.calendarclock4.innerhtml = curenttime(); }
var weburl = weburl;
document.write('
该文章在 2010/5/25 14:20:08 编辑过 |
相关文章
正在查询... |