how to disable button click in html code example Example: On click, disable button $("#btnSubmit").attr("disabled", true);