Custom "pop-up window" as you want

xiaoxiao2021-03-06  106

Special effects window example

Understand the definition of the window attribute, let's take a few special applications, it is still a bitology.

Control pop-up window via function call

As the pop-up window defined by "Sample Code 2", the window will not pop up without calling the popupWindow method, let's take a few common call methods:

Automatically pop up the window when the page is loaded

>

Automatically pop up the window when the page is closed

>>

Trigger the pop-up window via a link or button

>>>>>>>>

Pop-up window timing close

Add the following small code in the pop-up window, the pop-up window will automatically turn off after 20 seconds. (This code is to be added to the pop-up window, not the home page)