JQuery .trigger('submit') breaking

前端 未结 5 1346
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-21 09:48

Im finding that because all the forms that Im working on have a submit button which inlcudes a \'name=\"submit\"\' attribute, that the trigger submit is breaking when I clic

5条回答
  •  独厮守ぢ
    2020-12-21 10:30

    You'll have to use a different name for your button. "submit" is a reserved word, and using an element with the name "submit" will actually prevent jQuery from being able to submit your form at all.

    You can find a workaround at http://manicode.blogspot.com/2009/04/form-input-names-with-reserved-words.html

提交回复
热议问题