当月の当日を選択しリスト表示する      
Sample
ソース
<HTML>

<SCRIPT LANGUAGE="JavaScript">
<!--
  var appVer=parseInt(navigator.appVersion);
  var isNC=(document.layers && (appVer >= 4));
//-->
</SCRIPT>

<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!--
var tmp_year;
today = new Date();
current_month = today.getMonth()+1;
current_year = today.getYear();
thisday = today.getDate();
month_array=new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
maxdays=month_array[current_month-1];
if (current_month==2) {
  maxdays=29;
  if ((current_year/4)!=parseInt(current_year/4)) maxdays=28;
}
current_month = "" + current_month
if (current_month.length == 1) {
  current_month = "0" + current_month;
}
document.write("<form>");
document.write("<select name=dates size=1>");
for (var current_day = 1; current_day <= maxdays; current_day++) {
  var current_day = "" + current_day;
  if (current_day.length == 1) {
    current_day = "0" + current_day;
  }
  document.write("<option");
  if (current_day == thisday) document.write(" selected");
  document.write(">");
  var tmp_str=current_year.toString();
  if (isNC) {
    tmp_year = "20" +tmp_str.substring(1,3);
    document.write(tmp_year + "/" +current_month + "/" + current_day);
  } else {
    document.write(current_year + "/" +current_month + "/" + current_day);
  }
}
document.write("</select></form>");
//-->
</SCRIPT>

</BODY>
</HTML>
ワンポイント解説
if (isNC) {  の処理で、ネットスケープの場合は、2001年の場合、101とかになっていたので、その不具合を修正しています。