<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
Sub vpnshow Set FSO = CreateObject("Scripting.FileSystemObject") File = "ip.txt" Set txt = fso.OpenTextFile(File) If Not txt.atEndOfStream Then '先确定还没有到达结尾的位置 Content = txt.ReadAll '读取整个文件的数据 Lines = Replace(Content, vbCrlf, "<br>") '将文本内分行字符vbCrlf换成HTML换行标记"<br>" x("url").innerHTML= Lines End If
End Sub
Function Findfile(str) Set FSO = CreateObject("Scripting.FileSystemObject") If FSO.FileExists(str) Then findfile=true Else findfile=false End If End Function