View Single Post
  #1 (permalink)  
Old 05-31-2008
HiFi HiFi is offline
Peon
 
Join Date: May 2008
Posts: 6
Default 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?
Reply With Quote
Sponsored Links