submit event does not fire if submit initiated programmatically

后端 未结 2 1124
你的背包
你的背包 2020-11-30 12:37

I have a HTML form with button:

<
2条回答
  •  死守一世寂寞
    2020-11-30 13:26

    That's because you shouldn't just use the submit function, but trigger the submit like:

    $("#MyForm").trigger('submit');
    

提交回复
热议问题