网上提供的方法用不了
自己琢磨的
<script> function timestamp (value) { var date = new Date(value); var y = date.getFullYear(); var m = date.getMonth() + 1; m = m < 10 ? (‘0‘ + m) : m; var d = date.getDate(); d = d < 10 ? (‘0‘ + d) : d; return y + ‘/‘ + m + ‘/‘ + d; } </script>
<script src="js/template-web.js"></script> <script id="nnews" type="text/html"> <tbody> {{each Table1 as value i}} <tr> <td><a href="aaa.aspx?id={{value.id}}" >{{value.name}}</a></td> <td>{{value.time|timestamp}}</td> </tr> {{/each}} </tbody> </script> <script>
原文地址:https://www.cnblogs.com/uftwkb24/p/10010110.html
时间: 2024-10-29 21:45:48