title: How to show current date highlight in calender in javascript
body: <p>I have problem in highlight the current day in my calender, I have attached my code with this.</p>
  
  <pre><code>&lt;script language="javascript"&gt;
      &lt;!--
      // fill the month table with column headings
      function day_title(day_name){
      document.write("&lt;TD ALIGN=center WIDTH=35&gt;"+day_name+"&lt;/TD&gt;")
      }
      // fills the month table with numbers
      function fill_table(month,month_length)
      { 
      day=1
      // begin the new month table
      document.write("&lt;TABLE BORDER=3 CELLSPACING=3 CELLPADDING=%3&gt;&lt;TR&gt;")
      document.write("&lt;TD COLSPAN=7 ALIGN=center&gt;&lt;B&gt;"+month+"   "+year+"&lt;/B&gt;&lt;TR&gt;")
      // column headings
      day_title("Sun")
      day_title("Mon")
      day_title("Tue")
      day_title("Wed")
      day_title("Thu")
      day_title("Fri")
      day_title("Sat")
      // pad cells before first day of month
      document.write("&lt;/TR&gt;&lt;TR&gt;")
      for (var i=1;i&lt;start_day;i++){
      document.write("&lt;TD&gt;")
      }
      // fill the first week of days
      for (var i=start_day;i&lt;8;i++){
      document.write("&lt;TD ALIGN=center&gt;"+day+"&lt;/TD&gt;")
      day++
      }
      document.write("&lt;TR&gt;")
      // fill the remaining weeks
      while (day &lt;= month_length) {
      for (var i=1;i&lt;=7 &amp;&amp; day&lt;=month_length;i++){
      document.write("&lt;TD ALIGN=center&gt;"+day+"&lt;/TD&gt;")
      day++
      }
      document.write("&lt;/TR&gt;&lt;TR&gt;")
      // the first day of the next month
      start_day=i
      }
      document.write("&lt;/TR&gt;&lt;/TABLE&gt;&lt;BR&gt;")
      }
      // end hiding --&gt;
  
      &lt;/script&gt;
  
      &lt;script language="javascript"&gt;
  
      // CAHNGE the below variable to the CURRENT YEAR
      var d = new Date();
      var n = d.getFullYear();
  
      year=n
  
      var leap = ((year % 4 == 0) &amp;&amp; (year % 100 != 0)) || (year % 400 == 0);
      var add = 0;
      if(leap == true ){
      add = 1;
      }
      //alert(add);
  
  
      // first day of the week of the new year
      today= new Date("January 1, "+year)
      start_day = today.getDay() + 1   // starts with 0
      fill_table("January",31)
      fill_table("February",28+add)
      fill_table("March",31)
      fill_table("April",30)
      fill_table("May",31)
      fill_table("June",30)
      fill_table("July",31)
      fill_table("August",31)
      fill_table("September",30)
      fill_table("October",31)
      fill_table("November",30)
      fill_table("December",31)
      &lt;/script&gt;
  </code></pre>
  
  <p>In this calender, i want to highlight the current date, how to show ? 
  Thanks</p>