Pop up the javascript code for the simplest pattern mask layer _ javascript tips-js tutorial

Source: Internet
Author: User
There are many ways to pop up the pattern mask layer. This article introduces how to use js to implement the Simplest Pattern mask layer. The details are as follows, if you are interested, do not miss it. Suppose we have a container named iner as follows:

The Code is as follows:







Now, you need to pop up a p layer on the webpage so that the container cannot be operated before closing the p layer.
First, we need to define the p layer of the mask as follows:

The Code is as follows:








Next, we will use js to make the mask layer always show on the screen and do not operate on the content under the mask layer. Click the close button to close the mask layer.

The Code is as follows:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.