JavaScript to Submit Page After 30 Seconds

后端 未结 3 722
花落未央
花落未央 2021-01-17 01:29

I am looking for a JavaScript to submit a page after 30 seconds from when the page is loaded. Does jQuery offer this functionality or does someone have regular javascript f

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 02:20

    Using setTimeout you can achieve this by having a callback function which can submit a form for you (I presume that is what you mean by saying to 'submit a page')

        
    

    That will submit the form with the name 'myform' after 30 seconds the page has been loaded.

提交回复
热议问题