Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从 MySql 获取上次登录日期和时间,并想用 Moment.js 呈现它
如果..
$lastlogin = DATETIME - 我正在通过 MySql,
用 Moment.js 呈现它的 php 中的语法是什么。
提前致谢。
<?php $lastlogin = DATETIME; echo "<input type='hidden' id='date-time' value='".$lastlogin."'/>; ?> <script> var datetime = document.getElementById('date-time'); //pass this variable to moment.js </script>