我建立了一个留言簿,我想从Yarp(http://timeago.yarp.com/)添加Timeago插件。
我在页面顶部有这个javascript:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("abbr.timeago").timeago();
});
</script>
然后我有一个While循环,我从数据库发布文本。在每个文本上我都存储了DATETIME。
<abbr class="timeago" title="<?php echo $Date; ?>"><?php echo $Date; ?></abbr>
那么,如何更新日期?