简体   繁体   中英

How to pass the information of the input type=“submit” button clicked to the server side using AJAX?

I have a php form, submitting using AJAX. The form has multiple submit buttons, the server side is not able to understand which button is clicked.

How to pass the information of the inputType="submit" button clicked to the server side using AJAX?

You can have name for buttons.

input type="submit" name="submit_1"

Then you can check the name exist in your payload.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM