按鈕倒計時 按鈕倒計時
阿新 • • 發佈:2018-10-31
【轉自】按鈕倒計時
<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>
<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>