有趣的HTA程序
下面的脚本是采用Javascript
1 <head>
2 <title>Hello World</title>
3 <hta:application
4 applicationname="helloworld"
5 scroll="no"
6 border="5pt"
7 borderstyle="raised"
8 maximizebutton="yes"
9 minimizebutton="yes"
10 showintaskbar="yes"
11 caption="yes"
12 sysmenu="yes"
13 singleinstance="yes"
14 >
15 </head>
16
17 <script>
18 function test(){
19 alert ("Hello World");
20 }
21 </script>
22
23 <body>
24 <input type="button" value="Run Script" onClick="test()"><p>
25 </body>
这里的脚本采用vbscript
1 <head>
2 <title>Hello World</title>
3 <hta:application
4 applicationname="helloworld"
5 scroll="no"
6 border="5pt"
7 borderstyle="raised"
8 maximizebutton="yes"
9 minimizebutton="yes"
10 showintaskbar="yes"
11 caption="yes"
12 sysmenu="yes"
13 singleinstance="yes"
14 >
15 </head>
16
17 <script language="VBScript">
18 sub test
19 msgbox "Hello World", vbExclamation, "Hello World"
20 end sub
21 </script>
22
23 <body>
24 <input type="button" value="Run Script" onClick="test"><p>
25 </body>
程序运行后的界面