自动执行任务并每 10 分钟自动刷新一次网页
请指导我如何完成以下任务。
我必须每 15 分钟监控 5 个网页。
假设网页名称为 A.html
,B.html
,C.html
,D.html
,E.html
.
我正在打开每个 IE( Internet Explorer)每 15 分钟手动访问一次网页并检查是否有是向上还是向下。
我们可以使其自动化吗,我想要一个链接,如果我单击该链接,应该打开所有 5 个网页,并每 10 分钟自动刷新一次。
请向我建议任何可能的网页链接或者在这种情况下可以帮助我的网站或教程。
谢谢,
斯里哈里
Please guide me how can I achieve the below task.
I have to monitor 5 web pages every 15 minutes.
Say the webpages names are A.html
,B.html
,C.html
,D.html
,E.html
.
I am opening each IE(internet explorer) web page manually every 15 minutes and checking whether it is up or down.
Can we make this automated, I want a single link on which if I click it should open all the 5 web pages and autorefresh them for every 10 minutes.
Please suggest me any possible web links or websites or tutorials that can help me in this case.
Thanks,
Srihari
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
您可以通过单击按钮来调用此函数,例如:
如您所见,我声明了要打开的 uri 数组,并且还声明了刷新率(毫秒)。
在refreshWindows方法中,我循环遍历数组并为每个URI调用window.open方法。这里最重要的是我还为每个窗口提供了一个名称(refreshWindowINDEX)。因此,下次我使用已经使用过的名称调用 window.open-method 时,浏览器将在窗口中使用该名称打开该 uri。我调用 setTimeout 方法,以便 JavaScript 等待(在本示例中为 5 秒)并再次调用刷新 Windows 方法。在同一窗口中打开同一组 uri。
Try this:
You can call this function on a button-click for example:
As you can see, I declate an array of uri's that I want to open and I also declare a refreshRate (Milliseconds).
In the refreshWindows-method I loop through my array and call the window.open-method for each URI. The most important thing here is that I also provide a name for each window (refreshWindowINDEX). So the next time I call the window.open-method with a name that I've already used, the browser will open that uri in the window with that name. I call the setTimeout-method, so that JavaScript waits (in this example 5 seconds) and calls the refreshWindows-method again. Opening the same set of uri's in the same windows.