js文件中进行计算 var timestamp = Date.parse(new Date()); timestamp = timestamp / 1000; console.log(timestamp);