Javascript Disable button and reenable it after 5 seconds -
i want disable button on click , reenable in after 5 seconds not working properly.
function submitpoll(id){ document.getelementbyid("votebutton").disabled = true; document.getelementbyid("votebutton").delay(5000).disabled = false; }
.delay
jquery. can use settimeout
in javascript.
function submitpoll(id){ document.getelementbyid("votebutton").disabled = true; settimeout(function(){document.getelementbyid("votebutton").disabled = false;},5000); }
Comments
Post a Comment