HTML is the abbreviation (HTML application) of HTML Application, a new concept of software development. It directly saves HTML into the format of HTA. It is an independent application software, which is no different from the software interface designed by programming languages such as VB and C++.
Generally speaking, hta can be written in vbscript and jscript, and vbs is more powerful, after all, it is Microsoft's own thing. HTA can operate the database, and the interface can be implemented with html+css, which is very convenient to write some simple applications.
At present, the website of Cuoxin Webmaster has compiled some good hta examples for everyone. Friends who like it can go to here (//www.jb51.net/list/list_110_1.htm) to view it.
HTA instance
Here is an example of an HTA:
The code is as follows:
<html>
<head>
<title>; the first HTA example</title>
<style>
p {font-size:24;cursor:hand}
</style>
</head>
<body>
<center>
<p>
HTA
HTML Application
HTML Application
</p>
</center>
</body>
</html>
Copy the above code to any text editor, save it as *.hta, and double-click it to see the effect.
HTA properties
HTA is similar to ordinary web page structure, so it is easy to design. Of course, HTA has many unique attributes:
Syntax requirements
HTA's syntax requirements are even looser than HTML, and even tags such as <html>, <body>, etc. can be omitted:
Note: The above is the entire code of the entire HTA file.
The appearance of HTA
You can use <HTA:Application>; to set the appearance of the HTA application, such as the title bar, border size, etc., and must be placed in <head>;.
The code is as follows:
<html>
<head>
<title>; the first HTA example</title>
<HTA:Application ID="oHTA"
Applicationname="myApp"
border="thin"
borderstyle="normal"
caption="yes"
icon="filename.ico"
maximizebutton="yes"
minimizebutton="yes"
showitaskbar="no"
singleinstance="no"
sysmenu="yes"
version="1.0"
windowstate="normal"
scroll="yes">
</head>
<body>
<center>
HTA
HTML Application
HTML Application
<button onclick=”self.close()” style=”font-size:18”>; leave</button>
</center>
</body>
</html>
Attribute description:
APPLICATIONNAME attribute (applicationName)
This property is the name of the setting HTA.
BORDER attribute (border)
This property is the window border type set to HTA, and the default value is thick.
It can be set to thick borders.
dialog window specifies the window as a dialog box
none Specify window without border
thin specifies that the window is narrow border
BORDERSTYLE attribute (borderStyle)
This property sets the border format of the HTA window, and the default value is normal.
It can be set as
normal normal border format
Complex concave and convex format combination border
Raised Protruding 3D border
static 3D border format
sunken 3D border
CAPTION attribute (caption)
This property sets whether the HTA window displays the title bar or title, and the default value is yes.
ICON attributes (icon)