If you click the submit form button and submit it in 10 seconds, can you do this? Solution

Source: Internet
Author: User
If you click the submit form button and submit it in 10 seconds, can you do this? What we need now is: after the user clicks the submit button, it puts an advertisement and submits the form to the server. can this be done? I tried it here. I can only open a 10-second advertisement after submitting it to the server, and use Javascript, setInterval (& quot; form1.onsubmit () & q users to click the submit form button, can I submit the job in 10 seconds?
What we need now is:
After the user clicks the submit button, put an advertisement and submit the form to the server. can this be done?

I tried it here. I can only open a 10-second advertisement after submitting it to the server.

------ Solution --------------------
Use Javascript
------ Solution --------------------
SetInterval ("Fig ()", 10000)
------ Solution --------------------
You can fully consider using Ajax! The submission is in the background, and the front-end does not have to reflect your advertisement.

------ Solution --------------------
SetInterval ("Fig ()", 10000)
------ Solution --------------------
You can use windows. setTimeout () in javascript for implementation.
------ Solution --------------------
Stop using Javascript for 10 seconds and submit again.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.