Timestamp conversion
小猪
小猪 2017-07-24 11:07:44
0
2
1478

How to change the timestamp after refreshing the page to the current date

  1. Before refreshing the page, it was 2017/7/24 html/php: <?=date('Y-m-d h: i:s',$value['time']);?>

  2. After no refresh, the time becomes a timestamp js/html

  3. Using Ajax to execute str = "<td><a href='#' title='title'>" msg['row'][i]['time'] " </a></td><td>" msg['row'][i]['author'] "</td>";

小猪
小猪

互相学习互相进步

reply all(2)
立伟

After the operation is done in the background, just throw it to the front desk

小猪

Add picturesUQ)~3(P]1(SQ%]J1%BH4J_E.pngR]7PIK{)`17VSZR9M3H(3I1.png

  • reply <?=date('Y-m-d h:i:s',$value['time']);?> The template engine resolves to <?php date('Y-m-d h:i:s',$value['time']);?> Time is the timestamp. What js returns without refreshing is the timestamp without using the date function.
    ChaoYoung author 2017-07-24 11:50:48
  • reply The front-end js can be converted, or the background can be formatted and then assigned.
    ChaoYoung author 2017-07-25 15:14:04
  • reply Then how to convert the timestamp into a normal date? Please help me.
     朱均其 author 2017-07-24 11:55:18
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template