文章詳情頁
我輸入if語句的時候,流浪器報錯
瀏覽:68日期:2024-06-01 10:59:36
問題描述
VM345:1 Uncaught ReferenceError: time is not defined at <anonymous>:1:5
這是什么意思老師?
問題解答
回答1:需要先定義時間,老師是提前定義好的
var a=new Date()
undefined
time=a.getHours()
9
if(time<12)
{
x="你好";
}
"你好"
這樣就可以了
排行榜

熱門標簽