Home > Web Front-end > JS Tutorial > javascript pops up the div form by encapsulating div_javascript skills

javascript pops up the div form by encapsulating div_javascript skills

WBOY
Release: 2016-05-16 18:43:00
Original
1100 people have browsed it

Picture 1 (pop up a div)

Figure 2 (multiple pops up)
Constructor:

Copy code The code is as follows:

var DivWindow= function(popup/*outermost div id*/,popup_drag/*drag div id*/,popup_exit/*exit button id*/,exitButton/*trigger server-side exit button id*/ ,varwidth,varheight,zindex){
this.popup =popup ;
this.height =varheight ; //Window height is not used to set the window height and width, but is used to position the screen
this.width =varwidth; //Window width
this.popup_exit=popup_exit;
this.exitButton=exitButton;
this.zindex=zindex;
this.init = function(){ // Initialization window
this.popupShow();
this.startDrag(); //Set drag
this.setCommond(); //Set close
DivWindow.ArrayW.push(document.getElementById (this.popup)); //Storage window into array
}; this.init();
};

Call:
Copy code The code is as follows:



Yes You may think this is a bit strange. Don’t ask me why, because I have this need and will modify the masking effect when I have time. For more detailed code, please see Download
Full Code
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template