html5页面添加时间戳

timestamp=getUrlParam("timestamps");  

 function getUrlParam(name) {
   var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
   var r = window.location.search.substr(1).match(reg);
   if (r != null) return unescape(r[2]); return null;
  }

 

var timestamp1 = Date.parse(new Date());
  var times = timestamp1-timestamp;

posted @ 2017-04-05 14:15  JLCUI  阅读(9289)  评论(0编辑  收藏  举报