function getSysTime(){ var time = {} $.ajax({ type: "HEAD", url: "/", complete: function(x) { //console.log(x.getResponseHeader("Date")); var date = x.getResponseHeader("Date").substring(17,22).split(":") return time = { hours:parseInt(date[0])+8, minutes:parseInt(date[1]) } } })}var s = getSysTime()console.log(s)
添加回答
举报
0/150
提交
取消