【发布时间】:2013-03-25 15:45:20
【问题描述】:
我有一个 html 按钮,我想用 jquery 禁用它,在它被点击后大约 10 秒后我想启用它。
$('#test').click(function(){
$("#test").attr("disabled", true);
$('#test').html('Bitte warten..<img src="<?=CDN('/icons/loading/loading5.gif')?>" />');
});
我的计时器部分有问题。
我知道有类似setInterval(function() {}, 5000); 的东西,但这会一遍又一遍。
【问题讨论】:
-
您可以使用
clearInterval摆脱现有的setInterval。
标签: jquery button javascript