js//初始话日期

function InitDate()
{
  var today = new Date();
  var strTime=today.getYear();
  if (today.getMonth()<9) strTime=strTime+'/0'+(today.getMonth()+1);else  strTime=strTime+'/'+(today.getMonth()+1);
  if (today.getDate()<10) strTime=strTime+'/0'+today.getDate();else  strTime=strTime+'/'+today.getDate();
   document.all("Date_S").value=strTime;
   document.all("Date_E").value=strTime;
}


initDate();

//初始话日期
function initDate()
{
 var d = new Date();
 var s = "";
 s = s + d.getYear() + "/";
 s = s + (d.getMonth() + 1) + "/";
 s = s +  d.getDate();
 document.all("P.Q_RQEND").value = s ;
 document.all("P.Q_RQ").value = addDays(s,-30);
}

你可能感兴趣的:(js)