指定jquery文本框的时间格式
来源:互联网 发布:手机听英语单词软件 编辑:程序博客网 时间:2024/04/28 19:39
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="pagerHeader.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>aaa</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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=basePath %>js/jquery-1.7.2.min.js"></script>
<link href="<%=basePath %>/js/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>/js/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>/js/demo/demo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath %>js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>日期:</td>
<td><input required data-options="validType:'dates'" class="easyui-datebox"></td>
</tr>
</table>
<script>
$.extend($.fn.validatebox.defaults.rules, {
dates : {// 验证
validator : function(value) {
//格式yyyy-MM-dd或yyyy-M-d
return/^(?:(?!0000)[0-9]{4}([-]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-]?)0?2\2(?:29))$/i.test(value);
},
message : '清输入合适的日期格式'
}
})
</script>
</body>
</html>
<%@include file="pagerHeader.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>aaa</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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript" src="<%=basePath %>js/jquery-1.7.2.min.js"></script>
<link href="<%=basePath %>/js/themes/default/easyui.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>/js/themes/icon.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>/js/demo/demo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=basePath %>js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>日期:</td>
<td><input required data-options="validType:'dates'" class="easyui-datebox"></td>
</tr>
</table>
<script>
$.extend($.fn.validatebox.defaults.rules, {
dates : {// 验证
validator : function(value) {
//格式yyyy-MM-dd或yyyy-M-d
return/^(?:(?!0000)[0-9]{4}([-]?)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-]?)0?2\2(?:29))$/i.test(value);
},
message : '清输入合适的日期格式'
}
})
</script>
</body>
</html>
0 0
- 指定jquery文本框的时间格式
- 让文本框只能输入指定格式的类
- ASP.NET 文本框输入指定格式的字符
- ASP.NET 文本框输入指定格式的字符
- 根据指定的格式验证日期时间
- 获得当前指定格式类型的时间
- 将时间转换成指定的格式
- js获取指定格式的时间
- 文本框控制输入时间格式
- 文本框时间为日历格式
- 文本框控制输入时分秒的时间格式
- unix时间值转指定格式的时间串
- 时间函数---转换成指定格式的时间函数
- TimeUtils时间戳转换为指定格式的时间
- jquery获取时间差、时间格式的代码
- jquery获取时间差、时间格式的代码
- jquery 时间格式转换
- jquery显示时间格式
- 计算机视觉、机器学习相关领域论文和源代码大集合--持续更新……
- 九度OJ 1527 首尾相连数组的最大子数组和
- javascript小技巧
- php实现限制文件下载速度的代码实例
- 29.特殊的数字
- 指定jquery文本框的时间格式
- 的人和他的计划统计统计太费劲
- C99的Designated Initializers特性
- 30.回文数
- HDU 3926 Hand in Hand
- poj 3342 Party at Hali-Bula
- KMP-----匹配的高效算法
- 31.特殊回文数
- 《网络爬虫-Python和数据分析》数据库建库建表问题