Option Explicit
Dim output, ProxyEnable, ProxyServer, wshShell, doc
Sub Window_onLoad
loadProxySettings()
End Sub
Set wshShell = CreateObject("WScript.Shell")
ProxyEnable = wshShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable")
ProxyServer = wshShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer")
Function loadProxySettings()
If ProxyEnable = 1 Then
proxyStatus.className = "enabled"
proxyStatus.innerHTML = "Proxy aktiv"
toggleProxyButton.value = "Proxy deaktivieren"
proxyServer.value = ProxyServer
Else
proxyStatus.className = "disabled"
proxyStatus.innerHTML = "Proxy deaktiviert"
toggleProxyButton.value = "Proxy aktivieren"
proxyServer.value = ProxyServer
End If
End Function
只是找不到爲什麼這是給我的錯誤的問題:的VBScript對象所需
Object required "ProxyStatus"
(是的,我有與proxyStatus
的id
一個span
元素)
'Set doc = document'似乎將'doc'設置爲等於未初始化的東西。 –
嗯試了一下,但仍然是相同的。那就是爲什麼我這麼激怒..hmm謝謝你 – Steve
編輯你的代碼來顯示什麼'doc'設置等於。 –