Jquery - How to trigger $('#myForm').submit(function()

后端 未结 6 1673
暗喜
暗喜 2020-12-30 02:56

how can i trigger this function without using the form submit?

$(\'#myForm\').submit(function()
{ ....
6条回答
  •  时光说笑
    2020-12-30 03:32

    You could try -

    $('#myForm').trigger('submit');
    

    Working demo - http://jsfiddle.net/ipr101/KvwMb/1/

提交回复
热议问题