jquery getting post action url

前端 未结 3 891
感动是毒
感动是毒 2021-02-01 00:23

I\'m trying to access the post target action in a jquery function.

example:

3条回答
  •  伪装坚强ぢ
    2021-02-01 00:45

    $('#signup').on("submit", function(event) {
        $form = $(this); //wrap this in jQuery
    
        alert('the action is: ' + $form.attr('action'));
    });
    

提交回复
热议问题