您的位置:首页技术文章
文章详情页

谷歌浏览器里面time对象未定义

浏览:68日期:2024-05-31 13:08:00

问题描述

问if(time<12){ x="good morning";}

VM1817:1 Uncaught ReferenceError: time is not defined at <anonymous>:1:1

问题解答

回答1:

var a=new Date()

time=a.getHours()

给time赋值就好了

相关文章: