Click a specific submit button with JQuery

前端 未结 6 1422
温柔的废话
温柔的废话 2021-02-05 03:33

I am clicking a submit button using this:

$(\'input[type=submit]\').click(); 

The problem is that I have more that 1 submit button on my page s

6条回答
  •  自闭症患者
    2021-02-05 03:52

    Way late to the party, but if your submit buttons have names:

    $("input[name='submitbuttonname']").click();
    

提交回复
热议问题