How can I submit a form using JavaScript?

后端 未结 10 1732
北海茫月
北海茫月 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:18

    I will leave the way I do to submit the form without using the name tag inside the form:

    HTML

    
    

    JavaScript

    function placeOrder(form){
        form.submit();
    }
    

提交回复
热议问题