如图,在网页中有各种链接标签,如何模拟点击某个名称的标签。

解决方案 »

  1.   

    、使用Findwindow查找网页窗口的句柄
    2、使用FindWindowEx查找每个标签的句柄
    3、使用PostMessage对每个句柄发送单击消息
      

  2.   

    1、使用Findwindow查找网页窗口的句柄
    2、使用FindWindowEx查找每个标签的句柄
    3、使用PostMessage对每个句柄发送单击消息
      

  3.   

    Sub test()  
    Dim ie  
    Set ie = CreateObject("internetexplorer.application")  
    ie.Visible = True  
    ie.navigate "http://werdfas.comjasd.com"  
    While ie.busy Or ie.readystate <> 4  
    Wend  While ie.document.title <> "登 录"     '根据页面标题判断打开页面是否正确或是不是需要操作的页面
    Wend  
    While ie.busy Or ie.readystate <> 4  
    Wend    ie.document.logform.u6name.Value = "460"    '赋值  ie.document.logform.p6wd.Value = "366"       
      ie.document.logform.submit                   '这就是点击了  
        set ie=nothing        '清空所占用内存
    End Sub  call test
      

  4.   

    本帖最后由 bcrun 于 2012-09-19 11:33:37 编辑