alert("hello");
var d = Date();
//alert(d);
var currHour = d.getHours();
document.write(currHour);
function display1(currHour) {
if(currHour > 1) {
alert("good morning");
} else {
alert("ok bye" + currHour);
}
}
hello警告显示正常,日期也显示正常,但currHour未定义我不知道 我在这做错了什么。
感谢。