日期:2014-05-16  浏览次数:20427 次

js日期辅助入力控件
首先,添加用到的js和css文件,在附件中
其次,jsp页面需要写的代码
<head>
<link href="<%=request.getContextPath()%>/common/styles/calendar/system.css" rel="stylesheet" type="text/css"/>
<script language="javascript" src="<%=request.getContextPath()%>/common/js/calendar/utils.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/common/js/calendar/calendar.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/common/js/calendar/calendar-setup.js"></script>
<script language="javascript" src="<%=request.getContextPath()%>/common/js/calendar/calendar-en.js"></script>
</head>
<body>
			<div align="left"  height="25"><font color="red">*</font>期間開始日:</div>
			<input name="startDt" id="startDt" type="text" class="field" size="11" maxlength="10" 
				style="ime-mode:disabled" value="">
			<img src="<%=request.getContextPath() %>/common/images/calendar.gif" width="16" height="13" id="startDtt">
			<script language="javascript">
				Zapatec.Calendar.setup({
				inputField        : "startDt",
				button            : "startDtt"
				});
			</script>
</body>