disable button after clicking code example Example: On click, disable button $("#btnSubmit").attr("disabled", true);