我在Javascript中编写了一个事件管理器代码。 :(但出了点问题。代码无效。请帮助我
CODE
var plan = prompt("Hello , Made a week plan. Type the week name to add a event");
var week = [saturday, sunday, monday, tuesday, wednesday, thrusday, friday];
var saturday = '';
if (plan == saturday) {
var saturday = prompt("What will you do in saturday?");
}
var getknow = prompt("Do you want to cheack the schedule? Type the week name");
if (getknow == saturday) {
alert(saturday);
}
答案 0 :(得分:0)
这是你想要的。 :)
var plan=prompt("Hello , Made a week plan. Type the week name to add a event");
var week = ['saturday' , "sunday" , "monday" , "tuesday" , "wednesday" , "thrusday" , "friday"];
// var saturday = '';
if( plan == "saturday" ) {
var saturday=prompt("What will you do in saturday?");
}
var getknow=prompt("Do you want to cheack the schedule? Type the week name");
if ( getknow == saturday ) {
alert(saturday);
}