-
javascript operators
hi there,
what im tring to do is to change "bgColor" of my page when the "getSeconds" between.30 and 45 .(Lasts for 15 seconds only).I mean let the bgColor of my document change to "blue" when the seconds are between 30 and 40..I think I should use && --or ||...but how ?..could you give me an example that works..
**and can we change the color of text/font ,too?using the same method...
thanks
-
Assuming you know how to grab time already, the if statement would look like:
Code:
var sec = 35
if (sec >= 30 && sec <= 40) {
\\ add code here
}
-
grabing the time..
hi again..
I think I should learn more about "grabbing the time" what is the shortest script that "I can use the time element"
is "var sec=30" enough" or ..?
please help
thanks