国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

vpn連接程序hta版實現(xiàn)代碼(修改)

2024-08-26 00:15:42
字體:
來源:轉載
供稿:網(wǎng)友
代碼如下:
<HTA:APPLICATION
ID="MySampleHTA"
Caption="yes"
SCROLL="auto"
border="none"
borderStyle="static"
SINGLEINSTANCE="yes"
maximizebutton="no"
BORDER="no"
icon="dxdiag.exe">

<title>vpn 連接程序 hta版</title>
<style>
body
{
font-size:12;
BACKGROUND: #DADADA;
margin-left:5;

}

input
{
width:50;
overflow:visible;
border:1px solid lightblue;
background-color:#cccccc;
cursor:text;
}
button
{
border:1px solid gray;
width:70;
margin-left:2;
cursor:hand;
font-size:12;
filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#eaeaff', endColorStr='#618fff', gradientType='0');
}


</style>
<body>
<input id="id" size="30" value="mjj"></input><br>
<input id="pass" size="30" value="mjj"></input><br>
<input id="ip" size="50" value="vpn的ip" ></input><br>
<button id="ok" onclick=vbs:conn>鏈接</button>
<button id="nok" onclick=vbs:dconn>斷開</button>
<button id="ipshow" onclick=vbs:show>當前ip顯示</button>
<button id="vpnshow" onclick=vbs:vpnshow>vpn列表</button>
<button id="vpnhelp" onclick=vbs:showHelp>幫助</button><br>
<div id="url"></div>

</body>

<SCRIPT LANGUAGE="VBScript">
Set oShell = CreateObject("WScript.Shell")


Sub Window_onLoad
window.resizeTo 450,380
window.moveTo 300, 300
copy
End Sub

Sub copy
x("ip").value=me.clipboarddata.getdata("Text")
setTimeout "copy", 2000
End Sub

Function x(obj)
Set x=document.getElementById(obj)
End function

Sub dconn
cmd=oShell.exec("rasdial /d").StdOut.ReadAll()
x("url").innerHTML=cmd

End Sub


Sub show
x("url").innerHTML= "<br><br><iframe src=http://www.ip138.com/ip2city.asp></iframe>"
End Sub

Sub conn
tempfile="c:/tmp~386"
If Findfile(tempfile) = false Then
writef tempfile,x("ip").value
x("url").innerHTML ="Create pbk file ........ok,連接中"
Else
writef tempfile,x("ip").value
x("url").innerHTML ="pbk file 存在........ok,連接中"
End If


x("url").innerHTML= oShell.exec("rasdial pvpn "&x("id").value&" "&x("pass").value&" /PHONEBOOK:"&tempfile).StdOut.ReadAll()

End Sub

Sub vpnshow
Set FSO = CreateObject("Scripting.FileSystemObject")
File = "ip.txt"
Set txt = fso.OpenTextFile(File)
If Not txt.atEndOfStream Then '先確定還沒有到達結尾的位置
Content = txt.ReadAll '讀取整個文件的數(shù)據(jù)
Lines = Replace(Content, vbCrlf, "<br>") '將文本內分行字符vbCrlf換成HTML換行標記"<br>"
x("url").innerHTML= Lines
End If

End Sub


Function Findfile(str)
Set FSO = CreateObject("Scripting.FileSystemObject")
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 华坪县| 阿瓦提县| 甘泉县| 马龙县| 塔城市| 秦皇岛市| 利辛县| 财经| 绥滨县| 蒙山县| 日土县| 格尔木市| 蒲城县| 玉林市| 云浮市| 宜黄县| 霸州市| 大理市| 桃江县| 昌都县| 翁源县| 盐城市| 庆阳市| 瓦房店市| 郴州市| 奉新县| 雷州市| 安丘市| 宜春市| 青河县| 封开县| 梨树县| 临潭县| 南城县| 德格县| 邯郸县| 池州市| 平遥县| 孝义市| 邻水| 上栗县|