2
Well I have two buttons on a form, being them:
<button type='reset' onclick="history.back()">CANCELAR</button>
<button type='submit'>ok</button>
I have the following jquery that identifies clicking the button and sending 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'
.
it is possible to do this with jquery?
A button
type='submit'
already does form Ubmit. It seems to me that you are using jQuery without need? or this is a reduced version of your code?– Sergio
This in a reduced version.
– Hugo Borges