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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -