欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

HTA文件去除html控件認證和接收命令行參數(shù)

 更新時間:2009年07月26日 23:51:26   作者:vbs小鋪  
最近看vbscript程序員參考手冊第三版,講到hta的兩個應用

一是利用hta 去掉htm的控件驗證

hta1的代碼如下:

<html> 
<head> 
<title>Sample HTML Application one</title> 
</head> 
<body onload="Viewer.document.location.href='activexcontrol.htm'"> 
<iframe id="Viewer" application="yes"><!--這里是去掉驗證的關鍵--> 
</iframe> 
</body> 
</html> 

activexcontrol.htm代碼如下:

<script language="VBSCRIPT"> 
Dim FileSystem 
' Creates the FileSystemObject 
Set FileSystem = CreateObject("Scripting.FileSystemObject") 
</script> 

這樣就可以去掉htm的本地驗證了。

二、hta接收命令行參數(shù)

書中的代碼我估計有錯,不可能成功,我研究了一下,hta2應當這樣寫:

<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)) '接收最后一個參數(shù) 
a=document.getElementById("MySampleHTA").commandLine '這樣寫法是一個字符串,不是數(shù)組 
MsgBox TypeName(a)&"--"&a '驗證 
</script> 
</body> 
</html> 

在命令行下:hta2 lcx 就會彈出lcx的對話框

相關文章

最新評論