将字符串形式的日期转换成日期对象
var strTime="2011-04-16"; //字符串日期格式
var date= new Date(Date.parse(strTime.replace(/-/g,
var month=date.getMonth()+1; //获取当前月份
------------------------------------------------------------------------------------------------------
date.getYear();
date.getFullYear();
date.getMonth();
date.getDate();
date.getDay();
date.getTime();
date.getHours();
date.getMinutes();
date.getSeconds();
date.getMilliseconds();
date.toLocaleDateString();
var mytime=date.toLocaleTimeString();
date.toLocaleString( );