Jquery and multiple forms on a page

前端 未结 4 2047
[愿得一人]
[愿得一人] 2021-01-17 06:30

I have a several forms that are output from a database on the same page. It works fine when I don\'t use ajax. When I use Jquery it will only work for the first form. Could

4条回答
  •  死守一世寂寞
    2021-01-17 07:20

    I guess adding the context within your jQuery selectors could help. Give a try to :

     var hardSoft = $('.hardSoft', $(this).parent()).val();
    

    on every selector

提交回复
热议问题