
VB:实时错误424,要求对象。求解决方法 5
使用版本:VB6.0企业版代码:SetoOption=WebBrowser1.Document.createElement("OPTION")oOption.innerT...
使用版本:VB6.0 企业版
代码:
Set oOption = WebBrowser1.Document.createElement("OPTION")
oOption.innerText = "6"
oOption.Value = "6"
WebBrowser1.Document.getElementsByTagName("select")(2).appendChild (oOption)
For Each a In WebBrowser1.Document.getElementsByTagName("OPTION")
If a.Value = "1986" Or a.Value = "6" Then a.Selected = True
Next
请各位帮忙指点一下究竟是什么地方有问题,再把修改后的源码发上来。谢谢了~ 展开
代码:
Set oOption = WebBrowser1.Document.createElement("OPTION")
oOption.innerText = "6"
oOption.Value = "6"
WebBrowser1.Document.getElementsByTagName("select")(2).appendChild (oOption)
For Each a In WebBrowser1.Document.getElementsByTagName("OPTION")
If a.Value = "1986" Or a.Value = "6" Then a.Selected = True
Next
请各位帮忙指点一下究竟是什么地方有问题,再把修改后的源码发上来。谢谢了~ 展开
2个回答
展开全部
WebBrowser1.Document.getElementsByTagName("select")(index)
请确定getElementsByTagName("select")的元素个数!
或者判断WebBrowser1.Document.getElementsByTagName("select")(index)是否为空[ is Nothing]
请确定getElementsByTagName("select")的元素个数!
或者判断WebBrowser1.Document.getElementsByTagName("select")(index)是否为空[ is Nothing]

2025-08-05 广告
Paykka 从多个环节帮助用户节省时间,开户最快 1 个工作日完成,本地货币结算当日到账,提现更是几秒内就能完成。全流程都极大地缩短了时间成本,减少了用户的等待时间,提高了资金流转效率。...
点击进入详情页
本回答由paykka提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询