清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
function checkTime(obj){ var startTime= $(obj).parent().siblings().next().next().children().val();//到项目时间 var endTime= $(obj).parent().siblings().next().next().next().children().val();//离项目时间 var startDate=new Date(startTime.replace("-", "/").replace("-", "/")); var endDate=new Date(endTime.replace("-", "/").replace("-", "/")); var number = 0; var yearToMonth = (endDate.getFullYear() - startDate.getFullYear()) * 12; number += yearToMonth; monthToMonth = endDate.getMonth() - startDate.getMonth(); number += monthToMonth; //endDay = endDate.getDate(); //startDay = startDate.getDate(); //dayStep = endDay - startDay; //if (dayStep >= 0) { // if (dayStep >= 15) { // number += 1; // } //} else { // if (dayStep <= -15) { // number -= 1; // } //} $(obj).blur(); alert(parseInt(number + 1) + " 人月 "); return false; }