How to use javascript to create a simple pop-up layer DIV to display a mask in the center of the page _ javascript skills

Source: Internet
Author: User
This article introduces how to display a mask in the center of the page by using JavaScript to create a simple pop-up layer DIV. If you need it, you can refer to the two days to use a trainer, there are more problems than you think, such:
Ie6 background transparent ie6 center display and js object understanding
OpenID = display button, conID = p, closeID = close button to be displayed
Solved:
1. It can block select elements in ie6, but p has no transparency in ie6.
2. the pop-up p can always be displayed in the middle of the browser screen
Problem:
1. Currently,. class only supports # id
2. You need to set css for the p to be displayed.
3. Set css in ie6
For example, p {_ position: absolute; _ top: expression (documentElement. scrollTop + 340 + "px ");}
4. in ie6, the background p has no transparency. The results I found on the Internet cannot be solved. If you have any solution, please leave a message for me.

The Code is as follows:





JavaScript to create a simple pop-up layer DIV display mask in the center of the page



Click p


Sdfdsf
VolvoSaabMercedesAudi


Click p


Sdfdsf
VolvoSaabMercedesAudi




Please inform us of the reason for canceling the order so that we can improve it. Thank you very much!

I don't want to buy it now.

Wrong Information just filled in. I want to place an order again

Cancel before changing or adding a new product

Online banking and credit card payment problems

Wait too long and get impatient

Expensive Products

Goods out of stock

Other reasons

Automatic cancellation upon expiration in 72 hours (optional)

Selected
Click Cancel



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.