Set objDoc = objIE.document
Set objElement = objDoc.getElementById("ext-gen2687")
代码执行成功但未关闭标签条
objElement.Click
使用循环代码完全相同 保存锚元素的对象但不关闭标签条
For Each ul In objDoc.getElementsByTagName("ul")
For Each li In ul.getElementsByTagName("li")
For Each anchor In li.getElementsByTagName("a")
If anchor.ID = "ext-gen2687" Then
anchor.Click
End If
Next
Next
Next