//倒计时
$("#time").countdown({
date: "4 15, 2013", //Counting TO a date
htmlTemplate: "%{d}<span class=\"cd-time\">天</span>%{h}<span class=\"cd-time\">小时</span>%{m}<span class=\"cd-time\">分钟</span>%{s}<span class=\"cd-time\">秒</span>",
onChange: function( event, timer ){
},
onComplete: function( event ){
$(this).html("Completed");
},
leadingZero: true,
direction: "down"
});
//例子
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Date Countdown jQuery Plugin</title>
<script src="script/jquery-1.6.1.js" type="text/javascript"></script>
<script src="script/jquery.jcountdown1.3.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript">
$(document).ready(function() {
$("#time").countdown({
date: "3 29, 2013", //Counting TO a date
htmlTemplate: "%{d} <span class=\"cd-time\">天</span> %{h} <span class=\"cd-time\">小时</span> %{m} <span class=\"cd-time\">分钟</span> %{s} <span class=\"cd-time\">秒</span>",
onChange: function( event, timer ){
},
onComplete: function( event ){
$(this).html("Completed");
},
leadingZero: true,
direction: "down"
});
});
</script>
</head>
<body>
<div id="container">
<p id="time" class="time"></p>
</div>
</body>
</html>