【javascript】获取 格式化时间
function getDate() { var myDate = new Date(); var month = myDate.getMonth() + 1; var day = myDate.getDate(); month = (month.toString().length == 1) ? ("0" + month) : month; day = (day.toString().length == 1) ? ("0" + day) : day; var result = myDate.getFullYear() + month + day; //当前日期 return result; } //20190314