jquery - Get Html form when click button -
i take html form when clicci button inside. happens on jquery validate
submithandler: function(form) { console.log(form); savefunction(form); }, the log of form structure of form clicked
inside savefunction form
[object htmlformelement] the structure of page has many forms create loop inside there button this
<button type="button" onclick="delete()">delete</button> and want take structure of form clicked button, find or closest
<button type="button" onclick="delete(elimina_foto($(this)))">delete</button> js:
function elimina_foto(n) { var form = n.closest('form'); console.log(n); console.log(form.attr('action')); console.log(form.serialize()); }
Comments
Post a Comment