Well I have two buttons on a form, they are:
<button type='reset' onclick="history.back()">CANCELAR</button>
<button type='submit'>ok</button>
I have the following jquery that identifies the click on the button and sends the form:
$(document).ready(function () {
$("button").click(function () {
// Envia formulário
$("form").submit();
});
});
I need the $("form").submit();
password executed only when the clicked button is type='submit'
.
Is it possible to do this with jquery?