<html>
<body onload="javascript:load()">
<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">
function update()
{
    frm.begintime.value = Calendar.Year + "-" + Calendar.Month + "-" + Calendar.Day
}function load()
{
    Calendar.AfterUpdate=update
}
</script>
<SCRIPT LANGUAGE=javascript FOR=Calendar EVENT=AfterUpdate>
document.frm.begintime.value = Calendar.Year + "-" + Calendar.Month + "-" + Calendar.Day
</SCRIPT>
</body>
</html>

解决方案 »

  1.   

    <html>
    <body >
    <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>
    </body>
    </html>