jquery判空 string类型的日期比较大小
2013-12-12 13:57
232 查看
jquery 判空
if(value.length<=0){
alert("kongzhi");
}
jquery string类型的日期比较大小
var startTime = document.getElementById("startTime").value;
var endTime = document.getElementById("endTime").value;
if (startTime.length > 0 && endTime.length > 0) {
var start=new Date(startTime.replace("-", "/").replace("-", "/"));
var end=new Date(endTime.replace("-", "/").replace("-", "/"));
if (start > end) {
alert("起始时间大于结束时间,请重新选择!");
return;
}
}
if(value.length<=0){
alert("kongzhi");
}
jquery string类型的日期比较大小
var startTime = document.getElementById("startTime").value;
var endTime = document.getElementById("endTime").value;
if (startTime.length > 0 && endTime.length > 0) {
var start=new Date(startTime.replace("-", "/").replace("-", "/"));
var end=new Date(endTime.replace("-", "/").replace("-", "/"));
if (start > end) {
alert("起始时间大于结束时间,请重新选择!");
return;
}
}
相关文章推荐
- jquery 比较两个日期的大小
- C#中如何比较2个string类型的日期大小?
- 日期类型大小比较
- mysql varchar类型转换日期类型,比较大小
- Mysql日期类型大小比较---拉取给定时间段的记录
- Mysql日期类型大小比较---拉取给定时间段的记录
- 比较两个String类型日期大小
- java 日期Date类型比较大小
- sqlserver2000中字符串类型的日期如何比较大小
- 【jQuery日期处理】两个时间大小的比较
- 【jQuery日期处理】两个时间大小的比较
- sqlserver2000中字符串类型的日期如何比较大小
- Mysql日期类型大小比较
- C#中如何比较2个string类型的日期大小?
- 比较两个日期类型的大小
- jquery比较日期大小
- 【jQuery日期处理】两个时间大小的比较
- yyyy-MM-dd类型的日期字符串比较大小
- String 类型 日期时间大小的比较
- Mysql日期类型大小比较---拉取给定时间段的记录