function getNextTime(start){
//var start = '09:30:00';
var _s = new Date();
var startDate = _s.getFullYear()+'-'+_s.getMonth()+'-'+_s.getDay()+' '+start;
var _n = new Date(startDate).getTime()+1000;
var endDate = new Date();
endDate.setTime(_n);
var _hour = endDate.getHours().toString().length == 1?'0'+endDate.getHours().toString():endDate.getHours().toString();
var _minute = endDate.getMinutes().toString().length == 1?'0'+endDate.getMinutes().toString():endDate.getMinutes().toString();
var _second = endDate.getSeconds().toString().length == 1?'0'+endDate.getSeconds().toString():endDate.getSeconds().toString();
var next = _hour+':'+_minute+":"+_second;
return next
}
![](https://img2024.cnblogs.com/blog/35695/202408/35695-20240826070647288-243310440.jpg)