Delay/timing/Forced popup Windows JS code

Source: Internet
Author: User
Tags implement set time window
Pop-up windows | timing

Parameter explanation:

Set time: Then.settime (then.gettime () + 1*60*60*1000)

Mylove/ttan.htm (Transition page)
http://pop-up page in ttan.htm/is the page to be ejected

Scroll:1 (scroll bar)
Status:1 (status bar)
Help:1 (Help button)
Toolbar=1 (tool bar)
Resizable:1 (Whether you can drag to resize with the mouse)
dialogwidth:800px (width)
dialogheight:600px (height)
3000 (Delay popup time, in milliseconds.) 1 seconds =1000 milliseconds)

<!--pop-up ads-->
<script language= "JavaScript" >
function Get () {
var Then = new Date ()
Then.settime (Then.gettime () + 1*60*60*1000)
var cookiestring = new String (document.cookie)
var cookieheader = "cookie1="
var beginposition = Cookiestring.indexof (Cookieheader)
if (beginposition!=-1) {
} else
{document.cookie = "cookie1=popwin;expires=" + then.togmtstring ()
Focusid=settimeout ("focus (); Window.showmodelessdialog" (' ttan.htm ', ', ', ' scroll:0;status:0;help:0;resizable:0;d
ialogwidth:0px;dialogheight:0px ') ", 3000)
Window.focus ();
}
}get ();
</script>
<!--pop-up end-->

Content of ttan.htm:

<script language= "JavaScript" >
<!--
window.open ("http://pop-up page/");
-->
</script>
<script language= "JavaScript" >
<!--
SetTimeout (' Window.close (); ', 0)
-->
</script>

can achieve the same IP within a certain period of time only pop-up, you can implement a delay pop-up, you can implement forced eject!!



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.