Clicking submit button of an HTML form by a Javascript code

后端 未结 3 1844
野趣味
野趣味 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:10

    You can do :

    document.forms["loginForm"].submit()
    

    But this won't call the onclick action of your button, so you will need to call it by hand.

    Be aware that you must use the name of your form and not the id to access it.

提交回复
热议问题