js获取当前时间,格式为yyyy-mm-dd,自动补零

var time = new Date().Format(“yyyy-MM-dd”)

Guess you like

Origin blog.csdn.net/JavaSupeMan/article/details/118963057