js fmt 时间失败,解决方案

var time = "2016-12-13";
varn t ="<fmt:formatDate value='"+time +"' pattern='yyyy-MM-dd'/>";
console.log(t);

js中打印失败,fmt在js 中不能接收参数;

改为字符串截取格式化String_.substring(0,9)

原文地址:https://www.cnblogs.com/yuhoukongshan/p/6336939.html