xxxxxxxxxx
// default type attribute of plain html button is "submit", so it will trigger submitting a form.
// add type="button" to a button in form to disable default behavior of submitting the form.
<button type="button" onClick={-do something else like a console log-}>Not a Submit</button>
// also could use preventDefault()
const handleClick = (e) => {
e.preventDefault()
// do something
}
xxxxxxxxxx
$('form#id').submit(function(){
$(this).find(':input[type=submit]').prop('disabled', true);
});