摘要: 将字符串形式的日期转换成日期对象var strTime="2011-04-16"; //字符串日期格式var date= new Date(Date.parse(strTime.replace(/-/g,"/"))); //转换成Data(),这里获得的时间依次为:星期、月、日、年、时间var month=date.getMonth()+1; //获取当前月份--------------------------------------------------------------------------------------------------- 阅读全文
posted @ 2013-07-10 10:11 yycan 阅读(1015) 评论(0) 推荐(0) 编辑