JQuery - Appending to Serialize

前端 未结 2 1771
鱼传尺愫
鱼传尺愫 2020-12-29 23:16

I am trying to figure out how to append two more values to the serialize method in JQuery. I have the following code to submit a form with ajax and have two more variables t

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-29 23:33

    You can add new values by appending to your variable:

    formData += '&var1=blah&var2=blah';
    

提交回复
热议问题