1、使用moment
$('#aa1').html(moment().format('YYYY-MM-DD')); $('#aa2').html(moment().format('HH:mm:ss'));
2、怎么将日期转化为monment的方式。
// return moment(val).format('YYYY年MM月DD日') //自定义方案1,简写:LL 或 ll