<SCRIPT LANGUAGE="JavaScript"> <!--function DateDemo() { var d, s = "今天日期是: "; d = new Date(); s += (d.getMonth() + 1) + "/"; s += d.getDate() + "/";//+7 s += d.getYear(); return(s); } document.write(DateDemo()); //-->
<script language=javascript> execScript('s = DateAdd("d", 7, date)','vbscript'); //调用VBS里的函数从今天加上七天 var s = new Date(s); alert(s.getFullYear() +"-"+ (s.getMonth()+1) +"-"+ s.getDate()) </script>
<script language=javascript> var today = new Date(); today.setDate(parseInt(today.getDate().toString())+7); alert( show_date(today));function show_date(iDate){ var year = iDate.getYear().toString(); var Month = parseInt(iDate.getMonth().toString())+1; var aDate = iDate.getDate().toString(); if(parseInt(Month) <= 9) Month ="0"+Month; if(parseInt(aDate) <= 9) aDate ="0"+aDate; var value = Month+"/"+aDate+"/"+year; return value; } </script>
<!--function DateDemo()
{
var d, s = "今天日期是: ";
d = new Date();
s += (d.getMonth() + 1) + "/";
s += d.getDate() + "/";//+7
s += d.getYear();
return(s);
}
document.write(DateDemo());
//-->
execScript('s = DateAdd("d", 7, date)','vbscript');
//调用VBS里的函数从今天加上七天
var s = new Date(s);
alert(s.getFullYear() +"-"+ (s.getMonth()+1) +"-"+ s.getDate())
</script>
var today = new Date();
today.setDate(parseInt(today.getDate().toString())+7);
alert( show_date(today));function show_date(iDate){
var year = iDate.getYear().toString();
var Month = parseInt(iDate.getMonth().toString())+1;
var aDate = iDate.getDate().toString();
if(parseInt(Month) <= 9)
Month ="0"+Month;
if(parseInt(aDate) <= 9)
aDate ="0"+aDate;
var value = Month+"/"+aDate+"/"+year;
return value;
}
</script>