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
"+ 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