请问检测网页中的“刷新”按钮是否有效?
网页内容:
<TR style="DISPLAY: none" id=_tool>
<TD id=tool> <input name="back" type="submit" id=an title="后退" onClick="mo.action('back')" value="后 退" />
<input name="front" type="submit" id=an title="前进" onClick="mo.action('front')" value="前 进" />
<input name="refresh" type="submit" id=an title="刷新" onClick="mo.action('refresh')" value="刷 新" /> </TD> </TR>
每隔1分钟模拟点“刷新”一次代码:
Private Sub Form_Load()WebBrowser1.Navigate "c:\1.htm"Timer1.Interval = 2000End SubPrivate Sub Timer1_Timer()Static i As Integeri = i + 1If i = 5 ThenWebBrowser1.Document.getElementsByName("refresh")(0).Clicki = 0End IfEnd Sub