js校驗日期, 除週六周天。
var d = new Date();
var str = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate();
var dt = new Date(str.replace("-","/"));
//alert("星期"+"日一二三四五六七".charAt(dt.getDay()));
if(dt.getDay()=='7'){
var t=d.getTime()-1000*60*60*24-1000*60*60*24;
var str=new Date(t);
var str1 = str.format("yyyy-MM-dd");
document.getElementById("tser01").value=str1;
}else if(dt.getDay()=='1'){
var t=d.getTime()-1000*60*60*24-1000*60*60*24-1000*60*60*24;
var str=new Date(t);
var str1 = str.format("yyyy-MM-dd");
document.getElementById("tser01").value=str1;
}else{
var t=d.getTime()-1000*60*60*24;
str=new Date(t);
var str1 = str.format("yyyy-MM-dd");
document.getElementById("tser01").value=str1;
}
}