Home  >  Article  >  Backend Development  >  javascript - How to implement a pop-up window when entering the homepage of a website?

javascript - How to implement a pop-up window when entering the homepage of a website?

WBOY
WBOYOriginal
2016-08-23 09:17:421323browse

As soon as you enter, a prompt pops up in the middle

Reply content:

As soon as you enter, a prompt pops up in the middle

I think it should be the window.onload event

alert("The content you want to pop up");

(function(){alert('');})()

Alert can be solved, but the experience is not good.

Recommend a lightweight jQuery pop-up component
http://layer.layui.com/

It depends on how you want to implement it. The most common way is to give an alert prompt, or make a spring layer yourself, or use a spring layer library~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn