How to use a Web page to pop various forms of windows

Source: Internet
Author: User
Tags html page relative

How to use the Web page pop-up various forms of windows, I think most of us are aware of some, but that kind of a variety of pop-up window is how to get out, we have to learn today:





1. Bounce a full-screen window







<body onload= "window.open (' http://www.pconline.com.cn ', ' example01 ', ' fullscreen ');"  >


<b> www.e3i5.com </b>


</body>







2. A F11 window







<body onload= "window.open (' http://www.pconline.com.cn ', ' example02 ', ' Channelmode ');"  >


<b> www.e3i5.com </b>


</body>







3. Bounce A window with the Favorites link toolbar







<body onload= "window.open (' http://www.pconline.com.cn ', ' example03 ', ' width=400,height=300,directories ');" >


<b> www.e3i5.com </b>


</body>







4. Web Page dialog Box







<script language= "JavaScript" >


!--


ShowModalDialog (' http://www.pconline.com.cn ', ' example04 ', ' dialogwidth:400px;dialogheight:300px;


Dialogleft:200px;dialogtop:150px;center:yes;help:yes;resizable:yes;status:yes ')


//-->


</SCRIPT>


<b> www.e3i5.com </b>


</body>









<script language= "JavaScript" >


!--


showmodelessdialog (' http://www.pconline.com.cn ', ' example05 ', ' dialogwidth:400px;dialogheight:300px;


Dialogleft:200px;dialogtop:150px;center:yes;help:yes;resizable:yes;status:yes ')


//-->


</SCRIPT>


<b> http://www.pconline.com.cn </b>


</body>







ShowModalDialog () or showModelessDialog () to invoke the Web Page dialog, as for the difference between ShowModalDialog () and showModelessDialog (), is ShowModalDialog () open window (short mode window), placed on the parent window, must be closed in order to access the parent window (recommended as little as possible, so as not to be objectionable); showModelessDialog () (Short mode window)  You do not have to close or access the window opened by the parent window.





Dialogheight:iheight Sets the height of the dialog box window.


Dialogwidth:iwidth Sets the width of the dialog box window.


Dialogleft:ixpos Sets the left position of the dialog window relative to the upper-right corner of the desktop.


Dialogtop:iypos sets the top position of the dialog box window relative to the upper-left corner of the desktop.


Center: {Yes No 1 0} Specifies whether the dialog box is centered on the desktop, and the default value is yes.


Help: {Yes No 1 0} Specifies whether the dialog box window displays a context-sensitive aid icon.     The default value is yes.


Resizable: {Yes No 1 0} Specifies whether the dialog box window is variable in size.  The default value is "no".


Status: {Yes No 1 0} Specifies whether the dialog box window displays the status bar.  For modeless dialog windows, the default value is Yes, and for modal dialog windows, the default is "no".








5.HTA window




The full name of the
HTA is HTML application, translated as an HTML application,  You simply use the. HTA to save an HTML page for an extension even if you create an HTA file, let's use an HTA to make a window, save the following code as an. hta file, and then open it in a browser.





<HTML>


<HEAD>


<TITLE> www.e3i5.com </TITLE>




applicationname= "MYAPP"


border= "Thin"


borderstyle= "Normal"


caption= "Yes"


icon= "Filename.ico"


maximizebutton= "Yes"


minimizebutton= "Yes"


showintaskbar= "No"


Ingleinstance= "No"


sysmenu= "Yes"


version= "1.0"


windowstate= "normal"/>


</HEAD>


<BODY>


<b> http://www.pconline.com.cn </b>


</BODY>


</HTML>





Some people will find that the above code is a little different from the usual HTML, hta:application tags, which is the key, the HTA provides a series of application-oriented features, and then talk about its properties (my head is bloated)


ApplicationName Property (applicationname)


This property to set the name of the HTA.


Border Property (border)


This property is the window border type set to HTA, and the default value is thick.


it can be set to thick the specified window as a thick border


Dialog window specifies a dialog box


none Specifies a window without a border


thin specifies that the window is a narrow border


BorderStyle Property (BorderStyle)


This property sets the border format for the HTA window, and the default is normal.


it can be set to


Normal normal border format


Complex Bump Format combo Border


raised protruding 3D border


static 3D Border format


sunken recessed 3D border


Caption Property (caption)


This property to set whether the HTA window displays a title bar or caption, and the default value is yes.


Icon Property (icon)


This property to set an icon for the application.


Maximizebutton Property (Maximizebutton)


This property to set whether the Maximize button is displayed in the HTA window, and the default value is yes.


Minimizebutton Property (Minimizebutton)


This property to set whether the Minimize button is displayed in the HTA window, and the default is yes.


ShowInTaskbar Property (ShowInTaskbar)


This property to set whether this application is displayed in the taskbar, and the default value is yes.


SingleInstance Property (singleinstance)


This property to set whether this application can run only once.  The secondary property is identified with the ApplicationName property, and the default value is No.


Sysmenu Property (Sysmenu)


This property to set whether the system menu is displayed in the HTA window, and the default value is yes.


Version attribute (version)


This property to set the version of the application, the default value is null.


WindowState Property (WindowState)


This property to set the initial size of the HTA window, the default is normal.


it can be set to the normal default size


minmize minimization of


Maximize Maximization


the parentheses above are the properties referenced in the script. The above properties are read-only in the script.  In addition, you can use the CommandLine property in the script to retrieve the parameters of the application when it starts.


can continue to use most of the tags, scripts, etc. in the HTML in the HTA.


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.