我在 IE 8 和 7 中收到以下错误消息,代码如下,特别是当我调用该函数时:
setDayDelay();
这里有什么问题?
function setDayDelay() {
if (twoDigitDate == 1) {
day = ("day1");
startbuttondelay = 1600;
} else if (twoDigitDate == 7) {
day = ("day7");
startbuttondelay = 9400;
} else if (twoDigitDate == 8) {
day = ("day8");
startbuttondelay = 10300;
} else if (twoDigitDate == 9) {
day = ("day9");
startbuttondelay = 11000;
} else {
day = ("inactive");
startbuttondelay = 1000;
}
console.log("The day variable is: " + day);
console.log("The startbutton delay is: " + startbuttondelay);
}
setDayDelay();