How can I submit a form using JavaScript?

后端 未结 10 1611
北海茫月
北海茫月 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 17:01

    You can use the below code to submit the form using JavaScript:

    document.getElementById('FormID').submit();
    

提交回复
热议问题