jquery timeago的使用

<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/ 

下载附件包到下面的网址.

FROM:http://zccst.iteye.com/blog/1447705

你可能感兴趣的:(jquery)