one is to use the HTA to remove the HTM control validation
The code for HTA1 is as follows:
Copy Code code as follows:
<title>sample HTML Application One</title>
<body onload= "viewer.document.location.href= ' activexcontrol.htm '" >
<iframe id= "Viewer" application= "yes" ><!--here is the key to removing validation-->
</iframe>
</body>
The activexcontrol.htm code is as follows:
Copy Code code as follows:
<script language= "VBSCRIPT" >
Dim filesystem
' Creates the FileSystemObject
Set filesystem = CreateObject ("Scripting.FileSystemObject")
</script>
This will remove the HTM local validation.
second, the HTA receives command line arguments
The code in the book I guess wrong, impossible to succeed, I studied, Hta2 should write this:
Copy Code code as follows:
Id= "Mysamplehta"
caption= "Yes" >
<title>sample HTML Application Two</title>
<body>
<script language= "VBScript" >
Cmdlinearray = Split (mysamplehta.commandline) ' This is to turn the arguments in the command into an array
MsgBox Cmdlinearray (UBound (Cmdlinearray)) ' receives the last parameter
A=document.getelementbyid ("Mysamplehta"). CommandLine ' This is a string, not an array.
MsgBox TypeName (a) & "--" &a "validation
</script>
</body>
At the command line: Hta2 LCX will pop up the lcx dialog box