Instance 010 popup page modal dialog box Instance descriptionpops up a page modal dialog box of the specified size. Technical EssentialsThis example mainly applies the Window object's ShowModalDialog () method, which is used to pop up a Web page (modal) dialog box with the following syntax.
Variant = Object.showmodaldialog (Surl[,varguments[,sfeatures])
parameter description. 1.sURL: Specifies the URL file address. 2.vArguments: Used to pass parameters to a Web page, the type of the passed parameter is unrestricted, for a string type, the maximum is 4,096 characters, but you can also pass an object, such as index.htm. 3.sFeatures: Optional, Window dialog box settings parameters main parameters such as table.
parameter description
parameter |
description |
dialogwidth:number |
optional option for setting the The width of the conversation box. |
dialogheight:number |
options to set the height of the dialog box. |
dialogtop:number |
options to set the top position of the dialog window relative to the upper-left corner of the desktop. The |
dialogleft:number |
option to set the left position of the dialog window relative to your desktop. |
center:{yes|no|1|0} |
Optional, which specifies whether the dialog box is centered on the desktop, yes|1 is centered, no|0 is not centered , and the default value is yes. |
help:{yes|no 1|0} |
options to specify whether a context sensitive Help icon is displayed in the dialog window and the default value is yes. |
scroll:{yes|no 1|0} |
options to specify whether the dialog box has scroll bars. |
resizable:{yes|no 1|0} |
options to specify whether the dialog window size is variable and the default value is No. |
status:{yes|no 1|0} |
options to specify whether the dialog box displays the status bar. |
implementation Process(1) Main page index.html to implement popup function
(2) Pop-up page new.htmlNote: The content of the style tag is the knowledge of CSS, and we focus on the content within the script tag. So this example of ours is done.
JavaScript effect Instance 010-Popup page Mode dialog box