title: Disable button click after click and re-enable after 10 seconds in asp.net web form using jquery or javascript
body: <p>Currently, I am trying to achieve is disable a button after click and re-enable after 10 seconds. But it is not working.
  HTML Code</p>
  
  <pre><code>&lt;td&gt;
        &lt;asp:Button ID="btnResendOTP" runat="server" CssClass="button"
  Text="Resend OTP" OnClientClick="disableButton()" OnClick="btnResendOTP_Click"/&gt;
   &lt;/td&gt;
  </code></pre>
  
  <p>JS Function</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function disableButton() {
          document.getElementById("&lt;% btnResendOTP.ClientID %&gt;").disabled = true;
          setTimeout(function () { document.getElementById("&lt;% btnResendOTP.ClientID %&gt;").disabled = false; }, 10000);
      }
  
  &lt;/script&gt;
  </code></pre>