一是利用hta 去掉htm的控件驗(yàn)證
hta1的代碼如下:
| <html> <head> <title>Sample HTML Application one</title> </head> <body onload="Viewer.document.location.href='activexcontrol.htm'"> <iframe id="Viewer" application="yes"><!--這里是去掉驗(yàn)證的關(guān)鍵--> </iframe> </body> </html> |
activexcontrol.htm代碼如下:
| <script language="VBSCRIPT"> Dim FileSystem ' Creates the FileSystemObject Set FileSystem = CreateObject("Scripting.FileSystemObject") </script> |
這樣就可以去掉htm的本地驗(yàn)證了。
二、hta接收命令行參數(shù)
書中的代碼我估計(jì)有錯(cuò),不可能成功,我研究了一下,hta2應(yīng)當(dāng)這樣寫:
| <HTA:APPLICATION ID="MySampleHTA" Caption="yes"> <html> <head> <title>Sample HTML Application two</title> </head> <body> <script language="VBScript"> cmdLineArray = Split(MySampleHTA.commandLine)‘這是把命令中的參數(shù)變成數(shù)組 MsgBox cmdLineArray(UBound(cmdLineArray)) '接收最后一個(gè)參數(shù) a=document.getElementById("MySampleHTA").commandLine '這樣寫法是一個(gè)字符串,不是數(shù)組 MsgBox TypeName(a)&"--"&a '驗(yàn)證 </script> </body> </html> |
在命令行下:hta2 lcx 就會(huì)彈出lcx的對(duì)話框
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注