js获取当前时间 //获取当前时间,格式YYYY-MM-DD function getNowFormatDate() { var date = new Date(); var seperator1 = "-"; var year = date.getFullYear(); var month = date.getMonth() + 1; var strDate = date.getDate(); if (month >= 1 && month <= 9) {…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <script type="text/javascript"> function bodyLoad(){ var dateTime=new Date(); var hh=…
function getSevertime(){ var xmlHttp = new XMLHttpRequest(); if( !xmlHttp ){ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlHttp.open("HEAD",location.href,false); xmlHttp.send(); var severtime=new Date(xmlHttp.getResponseHeader…
function GetDateByShiJianChuo(timespan) { var date = new Date(parseInt(timespan.replace("/Date(", "").replace(")/", ""))); var dateStr = date.toLocaleDateString(); dateStr = dateStr.replace("/", "-&qu…
传入:Json格式的时间 JS如下: yyyy-M(MM)-d(dd) H(HH):m(mm):s(ss) function timeStamp2String(time) { var data=time; )); var year=datetime.getFullYear(); ; var date=datetime.getDate(); var hour=datetime.getHours(); var minute=datetime.getMinutes(); var second=date…