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

WBOY
Release: 2016-08-23 09:17:42
Original
1318 people have browsed it

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~

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!