Digging deeper into IE browser windows

Source: Internet
Author: User
Tags format continue html page key relative window access
Browser

Do not underestimate this ordinary windows, in addition to the commonly used window.open () and Window.resizeto () method to open the window, dig carefully, you can find a lot of mysteries in the inside, follow me to explore the following!

  I. Continuing Anatomy of the window.open ()

Note: If no special instructions, the following red code is the key code

  1. Play a full screen window

window.open (' http://www.webjx.com ', ' example01 ', 'fullscreen')

<ptml><body ><b>www.webjx.com</b></body></ptml>

My computer screen is a whole page, how, is not a touch screen taste it? (The finger involuntarily places up).

2, a F11 after the restart of the window

window.open (' http://www.webjx.com ', ' example02 ', 'channelmode')

<ptml><body ><b>www.webjx.com</b></body></ptml>

Such a window is similar to the browser mode that was F11 after being pressed.

3. Pop-up a window with the Favorites Link toolbar

window.open (' http://www.webjx.com ', ' example03 ', ' width=400,height=300,directories')

<ptml><body ><b>www.webjx.com</b></body></ptml>

Oh, the usual IE on the link toolbar is not very used, so this is not too cold, but perhaps some friends to use, the right when it is to give them.

Second, dialog box window

With IE Help on the Internet Explorer options open window, have you ever noticed (which guy would be bored to this level?) , we can also use the dialog window to implement it, which requires ShowModalDialog () or showModelessDialog ()

<ptml><script language= "JavaScript" ><!--showmodaldialog (' http://www.webjx.com ', ' example04 ', ' Dialogwidth:400px;dialogheight:300px;dialogleft:200px;dialogtop:150px;center:yes;help:yes;resizable:yes;status : Yes ')//--></script><b>www.webjx.com</b></body></ptml>

<ptml><script language= "JavaScript" ><!--showmodelessdialog (' http://www.webjx.com ', ' Example05 ', ' dialogwidth:400px;dialogheight:300px;dialogleft:200px;dialogtop:150px;center:yes;help:yes; Resizable:yes;status:yes ')//--></script><b>www.webjx.com</b></body></ptml>

The above I just try to do a kind of it, which more surprises are waiting for you to find out, as for ShowModalDialog () and showModelessDialog () is the difference between the ShowModalDialog () open window (short mode window), Placed on the parent window, must be closed to access the parent window (recommended as little as possible, so as not to be annoying); showModelessDialog () (for short, modeless window), open without closing or access to the window opened by the parent window.

Now I will explain some of the parameters here, you listen to me don't bother
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 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 context-sensitive aid icon is displayed in the dialog box window. 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".
I believe that after reading the above parameters, you will also be able to make a imitation of IE help window, haha ~ ~ Interesting bar

Three, HTA window

It is the final play of the protagonist, maybe some people are not familiar with this guy, I briefly introduced, the full name of the HTA for the HTML application, translation is the HTML application, All you have to do is simply use. 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, what do you find? Buy a check, go and see for yourself.

<HTML>
<HEAD>
<TITLE>www.webjx.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>www.webjx.com</b>
</BODY>
</HTML>

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

ApplicationName Property (ApplicationName)
This property sets the name of the HTA.
Border Property (border)
This property is the window border type set to an 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 Borders
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 value 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 sets whether the HTA window displays a title bar or caption, and the default value is yes.
Icon Property (icon)
This property sets the icon for the application.
Maximizebutton Property (Maximizebutton)
This property shows whether the Maximize button is displayed in the HTA window, and the default value is yes.
Minimizebutton Property (Minimizebutton)
This property sets whether the Minimize button is displayed in the HTA window, and the default is yes.
ShowInTaskbar Property (ShowInTaskbar)
This property sets whether the application is displayed in the taskbar, and the default is yes.
SingleInstance Property (singleinstance)
This property is 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 sets whether the System menu is displayed in the HTA window, and the default value is yes.
Version Property (version)
This property sets the version of the application and the default value is null.
WindowState Property (WindowState)
This property sets the initial size of the HTA window, and the default value is normal.
It can be set to the normal default size
Minmize minimization of
Maximize maximization

The above brackets 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.

You can also continue to use most of the tags, scripts, and so on in your HTA.

OK, so that's the end of our quest, do you have any intention of feeling especially bad? In fact, write this article, just think of a role, more content also need you to continue to experiment to study, if "Amoy" to what good things, don't forget to publish out OH.



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.