Clicking submit button of an HTML form by a Javascript code

后端 未结 3 1846
野趣味
野趣味 2021-02-07 04:33

I don\'t know much about WEB probramming, so feel free to ask if I\'m missing any details.

There is a certain website which I\'m visiting very frequently, and it require

3条回答
  •  终归单人心
    2021-02-07 05:31

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

    or, use the same code as the onclick handler:

    changeAction('submitInput','loginForm');
    document.forms['loginForm'].submit();
    

    (Though that onclick handler is kind of stupidly-written: document.forms['loginForm'] could be replaced with this.)

提交回复
热议问题