关闭

日期控件My97的时间限制

标签: My97
559人阅读 评论(0) 收藏 举报

1.功能描述:根据单选框的选中状态,动态显示my97的显示格式,具体的格式限制在My97的事例中就有详细介绍

http://www.my97.net/dp/demo/resource/2.4.asp


index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">   
    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
    <script language="javascript" type="text/javascript" src="jquery.js"></script>


<script type="text/javascript">
 function demo() {
  var searchTimeRange=document.getElementById("searchTimetoday").checked;
    
     if(searchTimeRange){
      WdatePicker({skin:'whyGreen',dateFmt:'H:mm:ss',minDate:'00:00:00',maxDate:'23:59:59'});
    } else {
        WdatePicker({skin:'whyGreen',dateFmt:'yyyy-M-d H:mm:ss',maxDate:'%y-%M-{%d-1} 23:59:59'});
    }
  }
</script>

</head>
 
  <body>
     查询时间范围:<input id="searchTimetoday" name="searchTime" type="radio" value="0" checked />
     今天
        <input id="searchTimehistory" name="searchTime" type="radio" value="1" />
      历史
      选择时间:<input id="beginDate" name="beginDate" type="text" class="txt_input1 Wdate" onfocus="demo()"/>-
     <input id="endDate" name="endDate" type="text" class="txt_input1 Wdate" onfocus="demo()"/> 
   </body>
</html>


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:32808次
    • 积分:915
    • 等级:
    • 排名:千里之外
    • 原创:59篇
    • 转载:6篇
    • 译文:1篇
    • 评论:0条
    文章分类