if (d1.toString()==d2.toString()) alert(true);
alert (Date.parse(d1)==Date.parse(d2));
js日期生成
var showDateStr =document.BeForm.showDateStr.value;
var showDateS = showDateStr.split("-");
var showDate = new Date(showDateS[0],showDateS[1]-1,showDateS[2],0,0);