时间

function compare_hms(a, b) {
    var i = a.getHours() * 60 * 60 + a.getMinutes() * 60 + a.getSeconds();
    var n = b.getHours() * 60 * 60 + b.getMinutes() * 60 + b.getSeconds();
    if (i > n) {
        $("#errorStartTime").empty().text("开始时间不能大于结束时间");
        $("#errorEndTime").empty().text("开始时间不能大于结束时间");
        arrflag.push("false");
    }
}

posted @ 2015-01-27 14:53  M i S s  阅读(111)  评论(0编辑  收藏  举报