How can I submit a form using JavaScript?

后端 未结 10 1731
北海茫月
北海茫月 2020-11-22 16:43

I have a form with id theForm which has the following div with a submit button inside:

10条回答
  •  礼貌的吻别
    2020-11-22 16:57

    document.forms["name of your form"].submit();
    

    or

    document.getElementById("form id").submit();
    

    You can try any of this...this will definitely work...

提交回复
热议问题