var time=new Date().getHours(); 获取当前系统时间的小时值,eg:若当前系统时间为2019.4.25 10:52 则返回10 转载于:https://www.cnblogs.com/zhufangyuan09/p/10766995.html