//获取当前日期 var myDate = new Date(); var nowY = myDate.getFullYear(); var nowM = myDate.getMonth()+1; var nowD = myDate.getDate(); var enddate = nowY+"-"+(nowM<10 ? "0" + nowM : nowM)+"-"+(nowD<10 ? "0"+ nowD : n…
<script language="JavaScript" type="text/javascript"> function GetDateStr(AddDayCount) { var dd = new Date(); dd.setDate(dd.getDate()+AddDayCount);//获取AddDayCount天后的日期 var y = dd.getYear(); var m = dd.getMonth()+1;//获取当前月份的日期 var…
<script type="text/javascript"> function getDate() { var date = new Date(); //得到当前日期原始模式 var newyear = date.getFullYear(); //得到当前日期年份 var newmonth = date.getMonth() + 1; //得到当前日期月份(注意: getMonth()方法一月为 0, 二月为 1, 以此类推.) var day = date.getDat…
来源:http://www.ido321.com/926.html JavaScript代码 1: /*设置农历日期*/ 2: var CalendarData=new Array(100); 3: var madd=new Array(12); 4: var numString="一二三四五六七八九十"; 5: var monString="正二三四五六七八九十冬腊"; 6: var cYear,cMonth,cDay,TheDate; // 农历每月只能是29或…
function fun_date(aa){ var date1 = new Date(), time1=date1.getFullYear()+"-"+(date1.getMonth()+1)+"-"+date1.getDate();//time1表示当前时间 var date2 = new Date(date1); date2.setDate(date1.getDate()+aa); var time2 = date2.getFullYear()+"-…