JavaScript Effect Instance 002-timed open Window

Source: Internet
Author: User
Tags script tag

Instance 002 timed Open Window Instance descriptionThis instance will open the window after the specified time. Technical EssentialsThe main application of the Window object settimeout () method to implement timed open windows. The syntax format for the SetTime () method is as follows.
<span style= "FONT-SIZE:14PX;" >settimeout (function,milliseconds) </span>

The parameters are described below. function: The name of the JavaScript custom function to invoke. milliseconds: Sets the time-out (in ms). function: The function is called after the timeout period has passed. This value can be cleared with the cleartimeout () function. Note: The SetTimeout () method calls the function only once after the time-out, and the SetInterval () method repeats the specified function at a certain time. implementation Process1. Create an ad page to open the window displaynew.html
2. Use function functions to create a custom pp () function, and apply the settimeout () method to implement a timed open window, the code is as followsindex.html
<pre name= "code" class= "HTML" >


Note: The content of the style tag is the knowledge of CSS, and we focus on the content within the script tag. So this example of ours is done.


JavaScript Effect Instance 002-timed open Window

Related Article

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.