Click a specific submit button with JQuery
问题 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 so I need to target a specific submit button. How could I do that? 回答1: If you know the number of submit inputs and which one (in order) you want to trigger a click on then you can use nth-child() syntax to target it. Or add an ID or a class to each one that separates them from the other. Selecting the elements by their index: $('input[type="submit"]:nth