Monday, 12 August 2013

How can I make Javascript target the month?

How can I make Javascript target the month?

Okay, so this is just theoretical to me, I have no code to help. Just
saying :)
I was wondering that since it is possible, or at least I have seen it been
done before, to make if statements with time i.e. if (time>20) is that
possible to do with months? Or did the example I just mention (which I
found on w3schools.com) actually use a variable without telling me haha.
What I'm really looking for is an if statement (hopefully simple) that
resembles something like if(month==1) { //incorrect script follows
goTo(Id);};
That example was hideous but the function it self is not what I'm looking
for.
I was just curious about this and couldn't find anywhere that didn't have
a page worth of code for something that, to me, looks so simple in the
times we're in. I'll experiment with the code until someone can tell me.
Thank you for your time : )

No comments:

Post a Comment