How do I auto-submit a form with Greasemonkey?

前端 未结 2 1611
甜味超标
甜味超标 2021-01-23 02:41

I\'m trying to autosubmit a form with greasemonkey however I\'m not sure how to do it with this button. The button seems to have the following properties

a class         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 03:03

    After you have got the username and password fields filled in, do this:

    unsafeWindow.Form.submit(document.getElementsByClassName('submit')[0]);
    

    Check unsafeWindow documentation here.

提交回复
热议问题