Function-两个日期大小比较
function checkDate(from,to){
if (from == "" || to == "") return 2;
var rValue = 0;
for (var i = 0; i < 10; i++) {
if (from.charAt(i) < to.charAt(i)) {
rValue = 1;
break;
} else if (from.charAt(i) > to.charAt(i)) {
rValue = -1;
break;
}
}
return rValue;
}