按钮倒计时

<a id="submit" class="pointer folwbtn">同意(<span id="tdown">9</span>)</a>

<script type="text/javascript">
$(function () {
var cout = 9;
var cdown = setInterval(fndown, 1000);
function fndown() {
$("#tdown").text(cout);
if (cout == 0) {
clearInterval(cdown);
$("#submit").attr("href", "<%= linkurl("services","form") %>").text("同意服务协议");
}
cout--;
}
});
</script>

  

posted @ 2014-06-16 14:26  microsoftzhcn  阅读(349)  评论(0编辑  收藏  举报