How do I write this JavaScript?
I have a date. Say, today's date. After the date, I want to display a sentence saying that the date has passed. Before the date, I want nothing to appear.
Here is the script I have:
var theDate=new Date();
var closingDate="03/04/03"
if (theDate=>closingDate) { postActive="<h1>The open date has passed.</h1>"; }
else { postActive=""; }
document.write(postActive);
What's missing?
|