title: expiry date for month and year
body: <p>having some trouble trying to figure this out, complete novice when it come to JavaScript. I'm trying to validate a form, more specific the expiry date of a credit card.
  e.g jan 2011 would be invalid but dec 2011 would be valid etc.
  This is what i have so far:</p>
  
  <pre><code>function ExpiryDate() {
  
  var year
  var months
  
  today = new Date();
      expiry = new Date(year, month);
      if (today.getTime() &gt; expiry.getTime())
  
      return false;
  else
      return true;
  };
  </code></pre>
  
  <p>my form reads:</p>
  
  <pre><code>&lt;form id="myform" method="post" action="default.html" onsubmit="return Validate(this);"&gt;
  
  &lt;p&gt;Expiration Date: Month
  
  &lt;select name="ExpMon" id="ExpMon" title="select a month"&gt; 
          &lt;option value="1"&gt;Jan&lt;/option&gt; 
          &lt;option value="2"&gt;Feb&lt;/option&gt; 
          &lt;option value="3"&gt;Mar&lt;/option&gt;
          &lt;option value="4"&gt;Apr&lt;/option&gt; 
          &lt;option value="5"&gt;May&lt;/option&gt; 
          &lt;option value="6"&gt;June&lt;/option&gt; 
          &lt;option value="7"&gt;July&lt;/option&gt; 
          &lt;option value="8"&gt;Aug&lt;/option&gt; 
          &lt;option value="9"&gt;Sept&lt;/option&gt; 
          &lt;option value="10"&gt;Oct&lt;/option&gt; 
          &lt;option value="11"&gt;Nov&lt;/option&gt; 
          &lt;option value="12"&gt;Dec&lt;/option&gt; 
   &lt;/select&gt;      
  
   Year:
   &lt;select name="ExpYear" id="ExpYear" title="select a year"&gt; 
       &lt;option value="2010"&gt;2010&lt;/option&gt; 
       &lt;option value="2011"&gt;2011&lt;/option&gt; 
       &lt;option value="2012"&gt;2012&lt;/option&gt; 
       &lt;option value="2013"&gt;2013&lt;/option&gt;
       &lt;option value="2014"&gt;2014&lt;/option&gt; 
       &lt;option value="2015"&gt;2015&lt;/option&gt;
  &lt;/select&gt;&lt;/p&gt; 
  
  &lt;/form
  </code></pre>
  
  <p>I'm not to sure how to use the id's to get what I want, any help would be appreciated, thanks in advance. note:I have a function called Validate which validates a text field in my form so i could attach it to this somehow.</p>