How JavaScript implements automatic pop-up windows and automatically closes Windows _javascript tips

Source: Internet
Author: User

This article illustrates how JavaScript implements automatic pop-up windows and closes Windows automatically. Share to everyone for your reference. Specifically as follows:

Here describes the JavaScript automatic pop-up window and automatically close the window, JS to achieve this effect seems very simple, open the page that shows a pop-up window, and then automatically leave, using the window.open and Document.open (); and Document.close (), objects together to achieve, now seems to use a little.

The effect is as shown in the following illustration:

The specific code is as follows:

<HTML> <HEAD> <TITLE> Auto-exit window </TITLE> <SCRIPT> <!--var flyingwin var popupwidth=200 var popupheight=150 var marginright var windowcenter var i_top=200 var i_left=-popupwidth-50 var step=40 var timer var Wai tingtime=5000 var pause=20 function ShowWindow () {Flyingwin = window.open ("", "Flyingwin", "toolbar=no,width=" +popupwid
 th+ ", height=" +popupheight+ ", top=100,left=" + (-popupwidth) + "");
 Flyingwin.document.open (); Flyingwin.document.write (" 

The

wants this article to help you with your JavaScript programming.

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.