Remove HTML control authentication and receive command line parameters from the HTA file

Source: Internet
Author: User

First, use HTA to remove the HTM Control for verification.
Hta1 Code As follows: Copy code The Code is as follows: <HTML>
<Head>
<Title> sample HTML application one </title>
</Head>
<Body onload = "viewer.document.location.href+'activexcontrol.htm'">
<IFRAME id = "Viewer" application = "yes"> <! -- Here is the key to removing verification -->
</Iframe>
</Body>
</Html>

activexcontrol.htm code: copy Code the code is as follows:

In this way, the local verification of HTM can be removed.
Ii. Receiving command line parameters by HTA
I guess there is something wrong with the code in the book and it is impossible to succeed. I have studied it. hta2 should write it like this:Copy codeThe Code is as follows: <HTA: Application
Id = "mysamplehta"
Caption = "yes">
<HTML>
<Head>
<Title> sample HTML Application two </title>
</Head>
<Body>
<Script language = "VBScript">
Export linearray = Split (mysamplehta. CommandLine) '. This changes the parameters in the command to an array.
Msgbox callback linearray (ubound (callback linearray) 'receives the last parameter
A = Document. getelementbyid ("mysamplehta"). CommandLine 'is a string, not an array.
Msgbox typename (a) & "--" & a' Verification
</SCRIPT>
</Body>
</Html>

In the command line: hta2 LCX, the LCX dialog box is displayed.

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.