you can use DatetimePicker ActiveX control, but it is too heavy, you should try dhtml datetime picker1. DHTML制作有日期选择的文本框
http://www.fjone.com/teaching/waa/121186.htm
2. DateTimePicker ActiveX Control<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="vbscript">
sub dodates()
window.document.DTPicker1.value=time()
window.document.DTPicker2.Value=now()
end sub
</script>
</HEAD>
<BODY onload="dodates()">
<OBJECT classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" height=26
id=DTPicker1
style="HEIGHT: 26px; LEFT: 0px; TOP: 0px; WIDTH: 100px" width=100
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="688">
<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="-2147483633">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
<PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
<PARAM NAME="CheckBox" VALUE="0">
<PARAM NAME="CustomFormat" VALUE="">
<PARAM NAME="DateIsNull" VALUE="0">
<PARAM NAME="Format" VALUE="662831106">
<PARAM NAME="UpDown" VALUE="1">
<PARAM NAME="CurrentDate" VALUE="36653">
<PARAM NAME="MaxDate" VALUE="2958465">
<PARAM NAME="MinDate" VALUE="-109205"></OBJECT><OBJECT classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" height=26
id=DTPicker2
style="HEIGHT: 26px; LEFT: 0px; TOP: 0px; WIDTH: 100px" width=100
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="688">
<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="-2147483633">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
<PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
<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="36653">
<PARAM NAME="MaxDate" VALUE="2958465">
<PARAM NAME="MinDate" VALUE="-109205"></OBJECT>
<P> </P></BODY>
</HTML>
http://www.fjone.com/teaching/waa/121186.htm
2. DateTimePicker ActiveX Control<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="vbscript">
sub dodates()
window.document.DTPicker1.value=time()
window.document.DTPicker2.Value=now()
end sub
</script>
</HEAD>
<BODY onload="dodates()">
<OBJECT classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" height=26
id=DTPicker1
style="HEIGHT: 26px; LEFT: 0px; TOP: 0px; WIDTH: 100px" width=100
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="688">
<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="-2147483633">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
<PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
<PARAM NAME="CheckBox" VALUE="0">
<PARAM NAME="CustomFormat" VALUE="">
<PARAM NAME="DateIsNull" VALUE="0">
<PARAM NAME="Format" VALUE="662831106">
<PARAM NAME="UpDown" VALUE="1">
<PARAM NAME="CurrentDate" VALUE="36653">
<PARAM NAME="MaxDate" VALUE="2958465">
<PARAM NAME="MinDate" VALUE="-109205"></OBJECT><OBJECT classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" height=26
id=DTPicker2
style="HEIGHT: 26px; LEFT: 0px; TOP: 0px; WIDTH: 100px" width=100
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="688">
<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="-2147483633">
<PARAM NAME="CalendarTitleForeColor" VALUE="-2147483630">
<PARAM NAME="CalendarTrailingForeColor" VALUE="-2147483631">
<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="36653">
<PARAM NAME="MaxDate" VALUE="2958465">
<PARAM NAME="MinDate" VALUE="-109205"></OBJECT>
<P> </P></BODY>
</HTML>
解决方案 »
- 请教一个关于JS代码的问题,高手请进
- li float :left 图片为什么为ie6异常 火狐正常
- 问题解决散分了,danica7773过来接分了,
- 一个js中如何调用另外一个js中的函数?
- 急等一个JS问题
- 如何将这段代码加入一个.js文件中?
- 如何去掉new ActiveXObject("Excel.Application");的警告
- js创建类的问题
- 如何提交给一个无菜单和工具栏的窗体呢?
- parseFloat计算有问题?在线等待!1.66+1.77=3.4299999999999997
- 那位知道document.all("id").innerTEXT同样功能的能在NetScape中如何实现?
- 如何能用按钮打开IE的Option对话框?
<OBJECT classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" height=26
id=DTPicker2
....
</OBJECT>
<form name="frmtest" action="picker.asp" method="post" onsubmit="checkInput()">
<input type="hidden" name="datex">
<input type="submit" value="submit">
</form>
<script language="javascript">
function checkInput()
{
document.frmtest.datex.value = document.all("DTPicker2").value;
return true;
}
</script>2. picker.asp:
<%
response.write "date:" & request("datex") & "<br>"
%>