Home  >  Article  >  Web Front-end  >  Pop up the simplest js code for modal mask layer_javascript skills

Pop up the simplest js code for modal mask layer_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:10:391024browse

Suppose we have a container container as follows:

Copy code The code is as follows:






Now we need to pop up a div layer in the web page so that the container cannot be operated before closing the pop-up div layer.
Then, we first need to define the div layer of this mask as follows:
Copy the code The code is as follows:







The next step is to use js to make the mask layer always display on the screen and the content under the mask layer cannot be manipulated. Click the close button to close the mask layer
Copy code The code is as follows:


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
Previous article:Introduction to several ways to obtain html objects in JS_javascript skillsNext article:Introduction to several ways to obtain html objects in JS_javascript skills

Related articles

See more