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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -