How to submit spring form in ajax(jquery) with modelAttribute

前端 未结 2 1373
不知归路
不知归路 2021-02-01 08:20

I am new to Spring MVC. I have a form like this,

and a co

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 08:45

    your ModelAttributes are not populated as you are not passing any params to server.Form data has to be posted to server

    $.post('myaction.htm', $('#formid').serialize()) to send ajax post request.

提交回复
热议问题