Value of submit button clicked

后端 未结 6 2125
眼角桃花
眼角桃花 2021-02-07 08:58

This should be really straight forward.

I\'m checking if a form is being submitted using jquery. The form has multiple submit buttons with various values:



        
6条回答
  •  你的背包
    2021-02-07 09:55

    This seems to get the clicked submit button:

    jQuery("#TheForm").context.activeElement.name
    jQuery("#TheForm").context.activeElement.value
    

提交回复
热议问题