16,471
社区成员
发帖
与我相关
我的任务
分享
void CTestDlg::OnButton1()
{
int k = 0;
//加载页面
m_WebBrowser.Navigate("http://www.baidu.com/", //网址
NULL,
NULL,
NULL,
NULL);
while (k < 10) //刷新10次后退出
{
Sleep(1000);
m_WebBrowser.Refresh(); //刷新页面
k++;
}
AfxMessageBox("End");
}
Dim k
k=0
Set Wshell=WScript.CreateObject("WScript.Shell")
AppName="页面刷新"
Set ie=WScript.CreateObject("InternetExplorer.Application")
ie.visible=True
ie.navigate "http://www.baidu.com/"
Do
Wscript.Sleep 2000
ie.refresh
k=k+1
Loop until k>50000
Set ie=Nothing
Set Wshell=Nothing