Internet explorer VBS确认IE弹出窗口
我有下一个HTML代码:Internet explorer VBS确认IE弹出窗口,internet-explorer,vbscript,popup,Internet Explorer,Vbscript,Popup,我有下一个HTML代码: <input type="submit" name="ctl00$MainContent$btn_update" value="Update" onclick="return confirm('You are about to update the data. Are you sure?');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$b
<input type="submit" name="ctl00$MainContent$btn_update" value="Update" onclick="return confirm('You are about to update the data. Are you sure?');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$btn_update", "", true, "Update_PL", "", false, false))" id="ctl00_MainContent_btn_update" class="normalButton" style="float: right; margin-right: 108px; margin-top: -3px; width: 130px; height: 50px; font-size: 24px;">
但我不知道怎么做,只需单击下面显示的“确定”按钮:
我尝试了下一个:
For Each a In .document.getElementsByTagName("a")
If InStr(a.GetAttribute("href"), linkToDetail)<> 0 And Not IsNull((InStr(a.GetAttribute("href"), linkToDetail))) Then
a.Click()
WaitWebLoad()
.document.getElementByID(editButton).Click()
WaitWebLoad()
.document.getElementByID(editArrivalDateTB).Value = activeSheet.Cells(rowIndex, columnArrivalDate).Value
.document.getElementByID(updateArrivalDateButton).Click()
'Something to press the OK button of the IE dialog window.
objShell.AppActivate(Window Title "- Internet Explorer")
WaitWebLoad()
objIE.document.getElementByID(backToSearchPL).Click()
WaitWebLoad()
Exit For
End If
Next
对于.document.getElementsByTagName(“a”)中的每个a
如果InStr(a.GetAttribute(“href”)、linkToDetail)0且不为null((InStr(a.GetAttribute(“href”)、linkToDetail)),则
a、 单击()
WaitWebLoad()
.document.getElementByID(编辑按钮)。单击()
WaitWebLoad()
.document.getElementByID(editArrivalDateTB).Value=activeSheet.Cells(rowIndex,columnArrivalDate).Value
.document.getElementByID(updateArrivalDateButton)。单击()
'要按IE对话框窗口的“确定”按钮的内容。
AppActivate(窗口标题“-InternetExplorer”)
WaitWebLoad()
objIE.document.getElementByID(backToSearchPL)。单击()
WaitWebLoad()
退出
如果结束
下一个
完成
由于我不能点击OK按钮,我已经删除了弹出式上升的代码
objIE.document.getElementById("nameOfTheButton").onclick = ""
objIe.document.getElementById("nameOfTheButton").Click()
objIE.document.getElementById("nameOfTheButton").onclick = ""
objIe.document.getElementById("nameOfTheButton").Click()