菜鸟呼叫高手:VB 用WebBrowser1 提交表单
答案:3 悬赏:50 手机版
解决时间 2021-08-18 15:05
- 提问者网友:太高姿态
- 2021-08-17 17:22
<input type="button" value="查询" onclick="queryregcode();" class="btn3_mouseout"
onmouseover="this.className='btn3_mouseover'"
onmouseout="this.className='btn3_mouseout'"
onmousedown="this.className='btn3_mousedown'"
onmouseup="this.className='btn3_mouseup'"/>
这是代码部分表单按钮没有设置名称
怎么样在VB下 用Command 代替 查询
Obj.All. *.Click 没有名称如何是好
最佳答案
- 五星知识达人网友:鸠书
- 2021-08-17 18:14
on error resume next
dim A
set a=webbrowser1.document.getelementsbytagname("input")
for each b in a
if b.value="查询" then b.click
end if
next
全部回答
- 1楼网友:你哪知我潦倒为你
- 2021-08-17 20:20
input type="button" value="查询" 利用这个代码
- 2楼网友:末日狂欢
- 2021-08-17 18:49
Dim StartingAddress As StringDim mbDontNavigateNow As BooleanPrivate Sub Form_Resize() '窗体重设大小事件cboAddress.Width = Me.ScaleWidth - 100WebBrowser1.Width = Me.ScaleWidth - 100'WebBrowser1.Height = Me.ScaleHeight - (picaddress.Top + picaddress.Height)End SubPrivate Sub cboAddress_Click() '下拉列表框的单击事件If mbDontNavigateNow Then Exit SubTimer1.Enabled = TrueWebBrowser1.Navigate cboAddress.TextEnd SubPrivate Sub cboAddress_KeyPress(KeyAscii As Integer) '下拉列表框键盘按下事件On Error Resume NextIf KeyAscii = vbKeyReturn ThencboAddress_ClickEnd IfEnd SubPrivate Sub Form_Load() '窗体加载事件On Error Resume NextMe.ShowToolbar1.RefreshForm_ResizecboAddress.Move 50, lblAddress.Top + lblAddress.Height + 15 '设置下拉菜单的位置If Len(StartingAddress) > 0 Then cboAddress.Text = StartingAddress '在下拉列表框的Text内容 cboAddress.AddItem cboAddress.Text '在下拉列表框中添加该项 Timer1.Enabled = True WebBrowser1.Navigate StartingAddress '在浏览器中显示该网页End IfEnd SubPrivate Sub Timer1_Timer() '计时器事件If WebBrowser1.Busy = False Then Timer1.Enabled = False Me.Caption = WebBrowser1.LocationName '设置窗体的Caption事件Else Me.Caption = "working......" '加载网站End IfEnd Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯