var $StartDate =
(
"
[
i
d
("[id
("[id=‘r_StartDate’]");
var $EndDate =
(
"
[
i
d
("[id
("[id=‘r_EndDate’]");
var StartYear = (new Date(
S
t
a
r
t
D
a
t
e
.
v
a
l
(
)
)
)
;
v
a
r
E
n
d
Y
e
a
r
=
(
n
e
w
D
a
t
e
(
StartDate.val())); var EndYear = (new Date(
StartDate.val()));varEndYear=(newDate(EndDate.val()));
if (StartYear > EndYear) {
$StartDate.addClass(“inpRedBorder”);
$EndDate.addClass(“inpRedBorder”);
layer.msg(“开始时间应小于结束时间”, { icon: 7 }, function () {
$StartDate.removeClass(“inpRedBorder”);
$EndDate.removeClass(“inpRedBorder”);
});
return;
}