All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET程序中常用的三十三种代码1_[Asp.Net教程]
javascript实现网页图片等比例缩放_JavaScript技术_编程技术
PHP的十个高级技巧(上)_[PHP教程]
教你用PHP写MySQL数据库的用户认证系统_[PHP教程]
在Windows系统上安装PHP应用程序服务器_php资料_编程技术
asp.net的Close()与Dispose()用法介绍_[Asp.Net教程]
WAP与PHP程序设计之基础篇_php资料_编程技术
用CSS解决未知高度的DIV垂直居中的问题_[Html教程]
在asp.net2.0中使用存储过程_.net资料_编程技术
ASP.NET页面传数据的各种方法和分析_[Asp.Net教程]
Reading number is top 10 pictures
Steal to eat bacon bird
男人帮杂志里的惹火性感美女1
超强高考作文
奇趣的世界记录1
BingBingFan apple dew point photo gallery1
分手的感悟
This is heaven to some path
福利福利。。。。。。
In the world the most mysterious 21 place landscape4
人美胸美腿更美4
Download software ranking
Boxer's Top ten classic battle8
Tram sex maniac 2 (H) rar bag4
Tram sex maniac 2 (H) rar bag12
The cock of the Grosvenor LTD handsome
Tram sex maniac 2 (H) rar bag17
Tram sex maniac 2 (H) rar bag18
Ashlynn Video4
linux高级编程
Desire a peach blossom
Dance with duck(male prostitution)
归海一刀 published in(发表于) 2014/1/30 0:58:52 Edit(编辑)
asp.net中客户端怎么保持与服务器时间一致_[Asp.Net教程]

asp.net中客户端怎么保持与服务器时间一致_[Asp.Net教程]

asp.net中客户端怎么保持与服务器时间一致_[Asp.Net教程]























后台代码中将服务器时间显示出来




Page.ClientScript.RegisterClientScriptBlock(this.GetType(),"time", "\r\n");
前台使用javascript进行转换




strTime=strTime.replace(/(-)/g,"/");
var datNow=new Date(strTime);
var datLocalNow=new Date();
datC=datLocalNow-datNow;
function GetServerTime()
{
var datNow=new Date(new Date()-datC);
var strYear=datNow.getFullYear();
var strMonth=datNow.getMonth()+1;
strMonth=strMonth<10?"0"+strMonth:strMonth;
var strDay=datNow.getDate();
strDay=strDay<10?"0"+strDay:strDay;
var strHour=datNow.getHours();
strHour=strHour<10?"0"+strHour:strHour;
var strMinite=datNow.getMinutes();
strMinite=strMinite<10?"0"+strMinite:strMinite;
var strSecond=datNow.getSeconds();
strSecond=strSecond<10?"0"+strSecond:strSecond;
("time").innerHTML=strYear+"年"+strMonth+"月"+strDay+"日 "+strHour+":"+strMinite+":"+strSecond
}
GetServerTime();
setInterval("GetServerTime()",1000);

来源:http://www.cnblogs.com/liydotnet














































添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.