Hat file reference

Source: Internet
Author: User

1. Pop up a full screen window

<HTML>
<Body onload = "window. Open ('http://qgqm.net.cn, 'example01', 'fullscreen ');">
<B> www.webjx.com </B>
</Body>
</Html>

RunCodeCopy the code and save the code. You can run the code to view the special effect. You can also copy or saveSource code.

2. Pop up a window after F11

<HTML>
<Body onload = "window. Open ('http://qgqm.net.cn, 'example02', 'channelmode');">
<B> www.webjx.com </B>
</Body>
</Html>

3. Pop up a window with the toolbar of the favorite Link

<HTML>
<Body onload = "window. Open ('HTTP: // qgqm.net.cn, 'example03', 'width = 400, Height = 300, directories ');">
<B> www.webjx.com </B>
</Body>
</Html>

4. webpage dialog box

<HTML>
<Script language = "JavaScript">
<! --
Showmodaldialog ('HTTP: // qgqm.net.cn, 'example04 ', 'dialogwidth: 400px; dialogheight: 300px; dialogleft: 200px; dialogtop: 150px; center: Yes; help: Yes; resizable: yes; Status: Yes ')
// -->
</SCRIPT>
<B> www.webjx.com </B>
</Body>
</Html>
<HTML>
<Script language = "JavaScript">
<! --
Showmodelessdialog ('HTTP: // qgqm.net.cn, 'example05 ', 'dialogwidth: 400px; dialogheight: 300px; dialogleft: 200px; dialogtop: 150px; center: yes;
Help: Yes; resizable: Yes; Status: Yes ')
// -->
</SCRIPT>
<B> www.webjx.com </B>
</Body>
</Html>

Showmodaldialog () or showmodelessdialog () to call the webpage dialog box. The difference between showmodaldialog () and showmodelessdialog () lies in the window opened by showmodaldialog () (mode window ), set it to the parent window. You must close the window to access the parent window (we recommend that you use it as little as possible to avoid dislike). showmodelessdialog () (no mode window for short ), you can access the window opened in the parent window without closing the window.

Dialogheight: the height of the window in the iheight Setting dialog box.
Dialogwidth: iwidth: Set the window width in the dialog box.
Dialogleft: Left position in the dialog box relative to the upper left corner of the desktop.
Dialogtop: the top position in the window of the iypos Setting Dialog Box relative to the top left corner of the desktop.
Center: {Yes No 1 0} specifies whether to center the dialog box on the desktop. The default value is "yes ".
Help: {Yes No 1 0} specifies whether the context-sensitive help icon is displayed in the dialog box. The default value is "yes ".
Resizable: {Yes No 1 0} specifies whether the dialog box window size is variable. The default value is "no ".
Status: {Yes No 1 0} specifies whether the status bar is displayed in the dialog box. For non-mode dialog box windows, the default value is "yes"; for mode dialog box windows, the default value is "no ".

5. HTA window

The full name of HTA is HTML application.ProgramYou only need to use it easily. even if an HTA file is created to store HTML pages with the extension, we use HTA to compile a window and save the following code. open the HTA file in a browser.

<HTML>
<Head>
<Title> www.webjx.com </title>
<HTA: Application ID = "Ohta"
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, with more HTA: Application tags, which is the key. HTA provides a series of application-oriented functions through it, next, let's talk about its attributes (my head is bloating again)

Applicationname attribute (applicationname)
This attribute is used to set the HTA name.
Border attributes (Border)
This attribute is the window border type set to HTA. The default value is thick.
It can be set to thick and the specified window is a rough border.
Dialog window specifies window as dialog box
None the specified window has no border
Thin specifies the window as a narrow border
Borderstyle attributes (borderstyle)
This attribute is used to set the border format of the HTA window. The default value is normal.
It can be set
Normal normal border format
Combined border of complex concave/convex format
Raised protruding 3D border
Static 3D border format
3D border with sunken Concave
Caption attributes (Caption)
This attribute sets whether to display the title bar or title in the HTA window. The default value is yes.
Icon properties)
This property is used to set the application icon.
Maximizebutton attributes (maximizebutton)
This attribute sets whether to display the maximize button in the HTA window. The default value is yes.
Minimizebutton attribute (minimizebutton)
This attribute sets whether to display the minimization button in the HTA window. The default value is yes.
Showintaskbar attribute (showintaskbar)
This attribute sets whether to display this application in the taskbar. The default value is yes.
Singleinstance attributes (singleinstance)
This attribute sets whether the application can run only once at the same time. The Secondary attribute is identified by the applicationname attribute. The default value is no.
Sysmenu attribute (sysmenu)
This attribute sets whether to display the system menu in the HTA window. The default value is yes.
Version)
This attribute is used to set the application version. The default value is null.
Windowstate attribute (windowstate)
This attribute sets the initial size of the HTA window. The default value is normal.
It can be set to normal default size
Minmize minimized
Maximize Maximization
The above brackets are the attributes referenced by the script. All the above attributes in the script are read-only. In addition, you can use the CommandLine attribute in the script to retrieve parameters when an application starts.
In HTA, you can continue to use the vast majority of tags and scripts in HTML.

<Head>
<Title> HTA demo </title>
<HTA: Application ID = "Ohta"
Applicationname = "MyApp"
Border = "thin"
Borderstyle = "normal"
Caption = "yes"
Icon = ""
Maximizebutton = "yes"
Minimizebutton = "yes"
Showintaskbar = "no"
Singleinstance = "no"
Sysmenu = "yes"
Version = "1.0"
Windowstate = "maximize"/>
<SCRIPT>
/* This function also retrieves the value of the CommandLine property,
Which cannot be set as an attribute .*/
Function window. onload ()
{
Stempstr = "applicationname =" + Ohta. applicationname + "\ n" +
"Border =" + Ohta. Border + "\ n" +
"Borderstyle =" + Ohta. borderstyle + "\ n" +
"Caption =" + Ohta. Caption + "\ n" +
"CommandLine =" + Ohta. CommandLine + "\ n" +
"Icon =" + Ohta. Icon + "\ n" +
"Maximizebutton =" + Ohta. maximizebutton + "\ n" +
"Minimizebutton =" + Ohta. minimizebutton + "\ n" +
"Showintaskbar =" + Ohta. showintaskbar + "\ n" +
"Singleinstance =" + Ohta. singleinstance + "\ n" +
"Sysmenu =" + Ohta. sysmenu + "\ n" +
"Version =" + Ohta. Version + "\ n" +
"Windowstate =" + Ohta. windowstate + "\ n ";
Opre. innertext = stempstr;
}
</SCRIPT>
</Head>
<Body scroll = "no">
<PRE id = opre> </PRE>
</Body>
</Html>

<! --
This is a simple HTA program. You can run it by saving it as *. HTA,
I went to Wang fujing and saw that javascript can connect to the database.
That is to say, JavaScript and HTA can be used as a simple c/s program to represent the database (JavaScript is not very fast );
The problem is that the programs made with VB and VC all have a beautiful icon, although HTA can have a graphic icon setting.
Icon = "", but it is only an icon that can be seen during running. I mean how to make it look good when it is not running,
Otherwise, it is an unrecognizable icon that comes with a white window. It is too ugly. Please ask if there is any solution
Example: C: \ WINDOWS \ HELP \ tours \ windowsmediaplayer \ wmptour. HTA
-->

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.