我需要做出無限循環出標記<input>
單選按鈕檢查一個接一個延遲一秒鐘。我也希望能夠通過.click事件來打破它。到目前爲止,我設法寫下這段代碼,但它直接轉到最後一個操作。此外,當我嘗試使用while(true)循環我的瀏覽器崩潰。循環幾個.prop動作jquery
<input type="radio" name="nav" id="first"/>
<input type="radio" name="nav" id="second"/>
<input type="radio" name="nav" id="third"/>
$(document).ready(function(){
setTimeout(function(){$("#third").prop('checked',true); }, 1000);
setTimeout(function(){$("#second").prop('checked',true); }, 1000);
setTimeout(function(){$("#first").prop('checked',true); }, 1000);
});
我是新來的jQuery和JS
在此先感謝
你有無限的元素或者你想複選框設定時間無限量? – Jason