首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > VFP >

vfp怎么在 webrowser中实现单击图片

2013-09-13 
vfp如何在 webrowser中实现单击图片如题:有一网页图片源码为:div stylefloat:leftimg srcimages/

vfp如何在 webrowser中实现单击图片
如题:

有一网页图片源码为:

<div style="float:left;"><img src="images/login_bt.gif" title="点击登录系统" align="middle" border="0" onclick="doLogin();" style="cursor: pointer;" /></div>

vfp 代码如何实现单击该图片。
[解决办法]
请参考:

*模拟单击图片(环境:vfp9.0)
ox=Createobject('InternetExplorer.Application')
url="http://www.archfans.com/PhotoContest/caseDetail.php?uid=1837&img_id=11035"
ox.Visible=.T.
ox.Navigate("&url")
Do While ox.busy Or ox.readyState <> 4
*Inkey(0.1,"H")  &&防止程序失去响应
DoEvents
Enddo
vDoc = ox.Document
For i = 0 To vDoc.All.Length - 1
vTag= vDoc.All(i)
If vTag.tagName="IMG"
If vTag.src = "http://www.archfans.com/PhotoContest/img/bigvote.jpg"
vTag.Click &&模拟鼠标单击
Exit
Endif
Endif
Endfor

热点排行