Popup code generation

Modify the options below, enter the content you want and click the Generate button.

After generation, a corresponding link will appear and you can click to test it.

URL:

Menu Bar:toolbar:address:Scroll bar:state:

width:high:Variable dimensions:

Popup Code

Copy the popup code from the generated box below

Friends who often surf the Internet may have visited some websites where a window pops up immediately after entering the homepage, or when you press a link or button. Usually, this window will display some notes, copyright information, warnings, welcome messages, or information that the author wants to remind you of. In fact, it is very easy to create such a page effect. Just add a few Javascript codes to the HTML of the page. Let me show you its secrets.

[The most basic pop-up window code]

The code is actually very simple:

window.open ('page.html')

Because this is a piece of javascript code, they should be placed between JAVASCRIPT tags.

window.open ('page.html') is used to control the pop-up of a new window page.html. If page.html is not in the same path as the main window, the path should be written in front of it. Both absolute path (http://) and relative path (../) are acceptable.

You can use either single or double quotes, just don't mix them.

This code can be added to any position in the HTML. The earlier it is placed, the earlier it will be executed. Especially if the page code is long and you want the page to pop up earlier, put it as early as possible.