100計數此刻,我可以把它我點擊的my fiddle shows每次算一個接一個。以下是我的html。如何從從0上升jQuery中
var count = 0;
$("#update").click(function() {
count++;
$("#counter").html("My current count is: " + count + "%");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="update" type="button">Button</button>
<div id="counter">1</div>
如何我居然只有一次點擊一個按鈕,使該縣從0到100%?
'count <100 && count ++;',我想你想限制計數 –
您是否問過一個「動畫序列」,只需點擊一次即可快速從0運行到100? – Thilo
@Thilo。是的,我只是重述了這個問題。 –