title: javascript to find leap year
body: <p>How can I get the code below to work when I have a month of february? Currently it is getting to the day and then stopping before getting to the if to determine whether it is a leap year. </p>
  
  <pre><code> if (month == 2) {
      if (day == 29) {
          if (year % 4 != 0 || year % 100 == 0 &amp;&amp; year % 400 != 0) {
              field.focus();
               field.value = month +'/' +  '';
          }
      }
      else if (day &gt; 28) {
          field.focus();
               field.value = month +'/' +  '';
      }
  }
  </code></pre>