`
zccst
  • 浏览: 3294596 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

jquery【插件】 timeago的使用

 
阅读更多
作者:zccst

<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script type="text/javascript" src="jquery.timeago.js"></script>
<script type="text/javascript" src="timeago.ch.js"></script>
<title>时间格式化</title>
<style type="text/css">
.a{ width:200px; height:100px; background-color:#FC9}
</style>
<script type="text/javascript">
jQuery(document).ready(function() {
  jQuery("abbr.timeago").timeago();
  //jQuery("div.timeago").timeago();
});
</script>
</head>

<div class="a timeago"></div>
<abbr class="timeago" title="2012-03-01 14:16:35"></abbr>
<abbr class="timeago" title="2012-03-09 14:16:35"></abbr>



官方网站:http://timeago.yarp.com/
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics