All of my if statements are false. I am using javascript. At the time i ran it, it should have opened my fifth period class. Instead it opened my "you are done page". can anybody tell me why. And note i am new to js so i am still trying to figure it out. Here is my code:
if((hours == 7) && (minutes >= 45))
{
window.open("https://classroom.google.com/u/0/c/MTIyMjc2NTIyODU2");
}
if((hours = 8) && (minutes >= 48))
{
window.open("https://classroom.google.com/u/0/c/MTE1MjA4MzM5MDgz");
}
if(((hours == 9) && (minutes >= 31)) || ((hours == 10) && (minutes < 5)))
{
window.open("https://classroom.google.com/u/0/c/MTIyMjk4MzAxMjYx");
}
if((hours == 10) && (minutes >= 5) && (minutes < 58))
{
window.open("https://classroom.google.com/u/0/c/MTIyNDM3NTk2NDk3");
}
if((hours == 10) && (minutes >= 58) || ((hours == 11) && (minutes < 44)))
{
window.open("https://classroom.google.com/u/0/c/MTIzMTkzMjU1MjAx");
}
if(((hours == 11) && (minutes >= 44)) || ((hours == 12) && (minutes < 21)))
{
window.open("lunch.html");
}
if(((hours == 12) && (minutes >= 21)) || ((hours == 13) && (minutes < 14)))
{
window.open("https://classroom.google.com/u/0/c/MTIyODg1NDU1MzUy");
}
if(((hours == 13) && (minutes >= 14)) || ((hours == 14) && (minutes < 7)))
{
window.open("https://classroom.google.com/u/0/c/MTIyNDk3Mjk5NDQ2");
}
if(((hours == 14) && (minutes >= 7)) || ((hours == 15) && (minutes < 56)))
{
window.open("https://classroom.google.com/u/0/c/MTIyNjk1NTQxMzYw");
}
else
{
window.open("done.html");
}
Aucun commentaire:
Enregistrer un commentaire