引用JS文件:
<script src="../js/my97/WdatePicker.js" type="text/javascript"></script>
<script>
function chkAddAction(){
var starttime = $.trim($(‘#starttime‘).val());
var endtime= $.trim($(‘#endtime‘).val());
if(starttime == ‘‘ || endtime ==‘‘){
tusi(‘请选择日期‘);
return false;
}
$(‘#chkForm‘).submit();
}
</script>
<form name="form1" method="post" action="" id="chkForm">
<tr>
<td align=right><font
color="red">*</font> 开始日期:</td>
<td
align=left><input name="starttime" type="text" class="Wdate"
id="starttime" onClick="WdatePicker()" value="" readonly>
结束日期
<input name="endtime" type="text" class="Wdate" id="endtime"
onClick="WdatePicker()" value="" readonly></td>
<td align=left><input type="submit" onClick="chkAddAction()"
style="width:120px;height:30px;"
value="提交数据"></td>
</tr>
</form>
原文地址:http://www.cnblogs.com/www-xiaobo-com/p/3768585.html