C#获取JS的GetTime()一样的值
2012-09-08 18:12:35 来源:WEB开发网核心提示:public long GetTimeLikeJS(){long lLeft = 621355968000000000;DateTime dt = DateTime.Now;long Sticks = (dt.Ticks - lLeft) / 10000;return Sticks;}完美模拟JS中的:var d =
public long GetTimeLikeJS() { long lLeft = 621355968000000000; DateTime dt = DateTime.Now; long Sticks = (dt.Ticks - lLeft) / 10000; return Sticks; }
完美模拟JS中的:
var d = new Date(); var ticks = d.getTime();
更多精彩
赞助商链接