HTA file Introduction (Writing small program good Dongdong) _hta

Source: Internet
Author: User

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.

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.