-3
我需要一些幫助,增加值/ 1每秒。增加值/腳本
我
<script>
function incrementValue()
{
var value = parseInt(document.getElementById('number').value, 10);
value = isNaN(value) ? 0 : value;
value++;
document.getElementById('number').value = value;
return false;
}
</script>
現在我需要的功能,這將增加「數量」的值,並開始添加+1每一秒,直到我點擊另一個圖像上。
我能夠做出的唯一的事情是:
function incrementvale()
var incrementTime = 1;
var incrementBy = 1;
private var counter = 0;
function Start() {
InvokeRepeating("Increment", incrementTime, incrementTime);
}
function Increment() {
counter += incrementBy;
}
這是可怕的錯誤! 問題!
當我點擊圖像。
函數啓動。
該函數每秒鐘將「數字」的值增加1。
感謝
這不是PHP ... – naththedeveloper