JavaScript implementation pops up the DIV layer and the page background changes to a translucent effect _ javascript tips-js tutorial

Source: Internet
Author: User
This article mainly introduces how to implement the pop-up DIV layer in JavaScript and how the page background changes to a translucent effect. It involves the implementation of the JavaScript pop-up window and the related techniques of dynamic conversion of page element attributes, for more information about how to use JavaScript to bring up the DIV layer, see the following example. We will share this with you for your reference. The details are as follows:

JavaScript pops up the DIV layer, and the page background changes to translucentScript var isIe = (document. all )? True: false; // set the visible state function setSelectState (state) {var objl = document. getElementsByTagName ('select'); for (var I = 0; I
 
  
 
"+ WTitle +"

"+ Content +"

"; StyleStr =" left: "+ (pos. x-wWidth)> 0 )? (Pos. x-wWidth): pos. x) + "px; top:" + (pos. y) + "px; position: absolute; width:" + wWidth + "px;" gradient mescript style.css Text = styleStr; document. body. appendChild (mesW);} // dimmed the background. function showBackground (obj, endInt) {if (isIe) {obj. filters. alpha. opacity + = 1; if (obj. filters. alpha. opacity Message Body

"; ShowMessageBox ('window title', messContent, objPos, 350);} script

Pop-up window

Drop-down listThe pop-up window is hidden and displayed when it is closed. The purpose is to prevent the pop-up DIV from retaining the drop-down box in IE.

Pop-up window

Pop-up window


Related Article

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.