<form name="frm" method="post">时间:<input type="text" name="begintime" size="10""></form>
<object id="Calendar" classid="CLSID:8E27C92B-1264-101C-8A2F-040224009C02" width="250" height="200" codebase="MSCAL.OCX"></object>
<SCRIPT LANGUAGE=javascript FOR=Calendar EVENT=AfterUpdate>
document.frm.begintime.value = Calendar.Year + "-" + Calendar.Month + "-" + Calendar.Day
</SCRIPT>
<object CLASSID="clsid:5220cb21-c88d-11cf-b347-00aa00a28331" WIDTH="0" HEIGHT="0">
<param NAME="LPKPath" VALUE="/ActiveX/pubocx.lpk">
</object>

解决方案 »

  1.   

    <OBJECT classid=clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1 
    height=25 id=DTP1 name=DTP1 style="HEIGHT: 25px; WIDTH: 100px" width=150>      
    <PARAM NAME="LPKPath" VALUE="/ActiveX/pubocx.lpk">
    <PARAM NAME="_ExtentX" VALUE="2646">
    <PARAM NAME="_ExtentY" VALUE="661">
    <PARAM NAME="_Version" VALUE="393216">
    <PARAM NAME="MousePointer" VALUE="0">
    <PARAM NAME="Enabled" VALUE="1">
    <PARAM NAME="OLEDropMode" VALUE="0">
    <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483647">
    <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTrailingForeColor" VALUE="12632256">
    <PARAM NAME="CheckBox" VALUE="0"><PARAM NAME="CustomFormat" VALUE="">
    <PARAM NAME="DateIsNull" VALUE="0">
    <PARAM NAME="Format" VALUE="662831105">
    <PARAM NAME="UpDown" VALUE="0">
    <PARAM NAME="CurrentDate" VALUE="36734">
    <PARAM NAME="MaxDate" VALUE="2958465">
    <PARAM NAME="MinDate" VALUE="-109205">
    </OBJECT>
    <input type=button value="get" onclick="alert((new Date(DTP1.value)).toLocaleDateString())">
      

  2.   

    <OBJECT classid=clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1 
    height=25 id=DTP1 name=DTP1 style="HEIGHT: 25px; WIDTH: 100px" width=150>      
    <PARAM NAME="LPKPath" VALUE="/ActiveX/pubocx.lpk">
    <PARAM NAME="_ExtentX" VALUE="2646">
    <PARAM NAME="_ExtentY" VALUE="661">
    <PARAM NAME="_Version" VALUE="393216">
    <PARAM NAME="MousePointer" VALUE="0">
    <PARAM NAME="Enabled" VALUE="1">
    <PARAM NAME="OLEDropMode" VALUE="0">
    <PARAM NAME="CalendarBackColor" VALUE="-2147483643">
    <PARAM NAME="CalendarForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTitleBackColor" VALUE="-2147483647">
    <PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
    <PARAM NAME="CalendarTrailingForeColor" VALUE="12632256">
    <PARAM NAME="CheckBox" VALUE="0"><PARAM NAME="CustomFormat" VALUE="">
    <PARAM NAME="DateIsNull" VALUE="0">
    <PARAM NAME="Format" VALUE="662831105">
    <PARAM NAME="UpDown" VALUE="0">
    <PARAM NAME="CurrentDate" VALUE="36734">
    <PARAM NAME="MaxDate" VALUE="2958465">
    <PARAM NAME="MinDate" VALUE="-109205">
    </OBJECT>
    <input type=button value="get" onclick="a=new Date(document.all.DTP1.value);alert(a.getYear() + '年'+(a.getMonth()+1)+'月'+a.getDate()+'日')">
      

  3.   

    我的用处在于验证事件是否正确
    function chkDate(y,m,d){
     Calendar.Year=y;
     Calendar.Month=m;
     Calendar.Day=d;
     if (Calendar.Year==y && Calendar.Month==m && Calendar.Day==d){
      return(true);
     } 
     else{
      return(false);
     }
    }
      

  4.   

    http://www.aspnetmenu.com/demo_controlContext.aspx.Net WebComponent提供的日期控件。
      

  5.   

    不爽,孟子E章的Netscape不支持!