I have the following form:
<form id="excluir" class="form-horizontal" role="form" method="POST">
<input type="hidden" name="_token" value="s59zI8Ehg0dw2CVnmqpfGgyyuHKJDHSF">
<input type="hidden" name="_method" value="DELETE">
</form>
I'm currently using the jQuery statement below to assign an action and submit the form:
$('#excluir').attr('action', '/post/12');
$('#excluir').submit();
However, I do not want to use a id tag in the form, I want to check if there is an input with the tag name="_ method" , if so, the action and submit the form.
Any ideas how to do this search?