标签:
//时间顺序处理
$(‘#start‘).change(function () {
startTime = $(‘#start‘).val();
endTime = $(‘#end‘).val();
if ((startTime > endTime)&&(endTime!=""))
{
dialog({
onshow: function () {
var obj = this;
this.content(‘<span class="text-danger">开始时间不能大于结束时间!</span>‘);
setTimeout(function () { obj.close() }, 1500);
},
quickClose: true
}).show();
$(‘#start‘).val("");
}
});
$(‘#end‘).change(function () {
startTime = $(‘#start‘).val();
endTime = $(‘#end‘).val();
if ((startTime > endTime) && (endTime != "")) {
dialog({
onshow: function () {
var obj = this;
this.content(‘<span class="text-danger">结束时间不能小于开始时间!</span>‘);
setTimeout(function () { obj.close() }, 1500);
},
quickClose: true
}).show();
$(‘#end‘).val("");
}
});
标签:
原文地址:http://www.cnblogs.com/mfc-itblog/p/5241054.html