1、jsp头部加:<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

2、例子:<td><fmt:formatDate value="${product.createDate  }" pattern="yyyy-MM-dd"/></td>,product.createDate为时间戳格式。

3、js中转换:new Date(temp.createDate).toLocaleString().substring(0, 10).replace(/年|月|\//g, "-"),emp.createDate为获取到后台传来的时间戳。

相关文章:

  • 2021-12-05
  • 2021-09-10
  • 2021-06-14
  • 2021-09-19
  • 2021-07-15
  • 2022-12-23
  • 2021-11-18
猜你喜欢
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-01-06
相关资源
相似解决方案