javascript - get action of submitted form -
i have following code triggered every time user submits form on site.
i want modify slightly, checks action of submission, , based on presence of particular keyword, runs code.
my code follows:
$("form").submit(function() { //do generic stuff var formaction = ""; //get action of submitted form if (formaction.indexof('keyword') !== -1) { //do specific stuff these forms } });
how action
of form
triggered call?
$("form").submit(function() { //some stuff... //get form action: var formaction = $(this).attr("action"); //some other stuff... });
Comments
Post a Comment