网友回复
思路就是时间段之间的时间差乘以随机就可以了,代码如下:
<script type="text/javascript">
//时间戳转换成时间
function timestampTotimestr(timestamp) {
var date = new Date(timestamp);
Y = date.getFullYear() + '-';
M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1): date.getMonth()+1) + '-';
D = date.getDate() + ' ';
h = (date.getHours() < 10 ? '0' + date.getHours(): date.getHours()) + ':';
...点击查看剩余70%


