首页 > 代码库 > 按钮倒计时

按钮倒计时

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