Always want to write some small programs in the script language, always written in HTML format, can be opened every time security prompts, today suddenly found that if you save the file in the HTA format, the effect is very different.
Hey..
HTA is the abbreviation of HTML Application (HTML application), is a new concept of software development, directly to save the HTML into the HTA format, is an independent application software, and VB, C + + and other program language design software is no different.
Here's an example of an HTA:
Copy Code code as follows:
<!-example1.hta-->
<title> example of the first HTA </title>
<style>
p {Font-size:24;cursor:hand}
</style>
<body>
<center>
<p>HTA</P>
<p>html application</p>
<p>html Applications </p>
</center>
</body>
Copy the above code into any text editor and save it as *.hta, and you can see the effect directly by double-clicking it.
The HTA is similar to a normal web page structure, so it's easy to design, and of course the HTA has many of its own unique attributes:
1, HTA requirements for syntax than HTML, and even <!-example2.hta?
Farewell
Wang wei
Dismount to lead the wine, ask the gentleman where it.
......
Note: The above is all the code for the entire HTA file.
2, the appearance of the HTA
You can use <HTA:Application> to set the appearance of the top HTA application, such as the title bar, border size, and so on, which must be placed in
Copy Code code as follows:
<!-example3.hta-->
<title> example of the first HTA </title>
border= "thick"
caption= "Yes"
maximizebutton= "Yes"
minimizebutton= "Yes"
sysmenu= "Yes"
Windowstate= "Normal"
>
<body>
<center>
<p>HTA</P>
<p>html application</p>
<p>html Applications </p>
<button onclick= "Self.close ()" style= "font-size:18" > Leave </button>
</center>
</body>
A description of some properties:
border= "thick" can be changed to "thin"
caption= "Yes" "no"
maximizebutton= "Yes" "no"
minimizebutton= "Yes" "no"
sysmenu= "Yes" "no"
Windowstate= "Normal" "maximize" full screen, "minimize" minimized
In fact, the script can be used in JScript or VBScript, and in general VBScript more features.