<p style="margin-left:104px; cursor: pointer;">
    <img src="/pub/resource/image/votes.jpg"
         onmouseover="this.src='/pub/resource/image/votes_on.jpg';"
         onmouseout="this.src='/pub/resource/image/votes.jpg'"
         onclick="toupiao();">
</p>上面是某网页图像做按钮,请问要怎么模拟鼠标点击该按钮,以及当点击该按钮后,关闭弹出的对话框

解决方案 »

  1.   

    web模拟点击:
    http://www.cnblogs.com/del/archive/2009/01/07/1370907.html?login=1
      

  2.   

    谢谢楼上,另请问下Timer的OnTimer事件中webbrowser1.Navigate('http://up.95516.net/vote/show/' + tpCode[FIndex]);会触发raised exception class EOleException with message '请求的资源在使用中',而把该语句发在Button的单击事件中,能顺利打开新网页,问题出在哪里?
      

  3.   

    点击,找到docoment中的的对象,执行click方法,关闭窗体,findwindow找到标题,发送wm_close消息
      

  4.   

    请问bdmh,我在form上放上TWebBrowser,TTimer, TButton控件,在Button的Click事件上执行下面代码:
    webbrowser1.Navigate('http://up.95516.net/vote/show/' + tpCode[FIndex])
    FIndex := FIndex + 1;
    每次点击都能正常刷新页面如果我在Timer的OnTimer写上的相同语句,就会出现”请求资源在使用中“的对话框,中间加上sleep也是一样的按照你上面说法,我要关闭那个窗口才能使OnTimer执行正常