这就是我到目前为止所拥有的。我正在尝试使用 IE 进行用户输入。我需要帮助的是应该调用 myfunc() 的“OnClick”。
'global variables
Dim objIE, screen, w, h
GetClient
'==============================================SUBS AND FUNCTIONS BELOW=================================================
Sub GetClient
Set objIE = CreateObject("InternetExplorer.Application")
set screen = ObjIE.Parent
w = screen.width
h = screen.height
'make IE look like an input box kinda
objIE.Navigate("about:blank")
objIE.Document.Body.Style.overflow = "auto"
objIE.document.title = "--------------------BITB Client--------------------"
objIE.visible = true
objIE.MenuBar = False
objIE.ToolBar = False
objIE.AddressBar = false
objIE.Resizable = False
objIE.Width = 400
objIE.Height = 280
objIE.Left = (w/2) - 200
objIE.Top = (h/2)
'html form to get input
objIE.Document.Body.InnerHTML = "<p>-Please choose a client listed below-</p>" _
& "<form>" _
& "<input type=""radio"" name=""client"" value=""176"">176<br>" _
& "<input type=""radio"" name=""client"" value=""515"">515<br>" _
& "<input type=""radio"" name=""client"" value=""760"">760<br>" _
& "<input type=""submit"" value=""submit"" OnClick=""VBScript:myfunc()"">" _
& "</form>"
end sub
function myfunc()
msgbox "yay it works"
end function
我到处都看过,我不明白为什么这不起作用。如果有人可以提供帮助,将不胜感激。=]。此外,如果有人想制作可以判断选择了哪个单选按钮的功能,请继续。