【发布时间】:2017-08-31 16:43:12
【问题描述】:
我似乎无法做到这一点。之前帮助过我的人告诉我使用 jQuery,我已经尝试过但无法让它工作。我正在尝试自动刷新我制作的 html 页面上的一个分区,而不是整个页面。
我尝试了元刷新,但主页面确实如此。我搜索的每个地方都有类似的答案,但我无法让它工作。我要刷新的分区称为“帧”,我只需要它每 45 分钟刷新一次。
<html>
<head>
<title>Station 47</title>
</head>
<body bgcolor="DarkRed">
<body a link="black" vlink="black">
<center><font face="Times New Roman" size="6"><marquee behavior="scroll" direction="left">Naval District Washington Fire Department Station 47</marquee>
</body>
<table border="0">
<tr>
<td>
<p align="left">
<iframe id="Iframe1" src="https://webview.active911.com/client/" frameborder="0" scrolling="no" width="2360" height="930"></iframe>
</td>
</tr>
<tr>
<td>
<div>
<iframe id="Iframe2" src="http://www.chart.state.md.us/video/video.php?feed=7401e25800f700d700437a45351f0214" width="400" height="400" Frameborder="0" scrolling="no"></iframe>
<iframe id="Iframe3" src="http://www.chart.state.md.us/video/video.php?feed=7e01ec5800f700d700437a45351f0214" width="400" height="400" Frameborder="0" scrolling="no"></iframe>
<iframe id="Iframe4" src="http://www.chart.state.md.us/video/video.php?feed=7901e75800f700d700437a45351f0214" width="400" height="400" frameborder="0" scrolling="no"></iframe>
<iframe id="Iframe5" src="http://www.chart.state.md.us/video/video.php?feed=6100bdd12e83001c00503336c4235c0a" width="400" height="400" frameborder="0" scrolling="no"></iframe>
<iframe id="Iframe6" src="http://www.chart.state.md.us/video/video.php?feed=4900c5b02e84001c00503336c4235c0a" width="400" height="400" frameborder="0" scrolling="no"></iframe>
<iframe id="Iframe7" src="http://api.wunderground.com/api/5ce4445b4bd79f9a/animatedradar/q/MD/Annapolis.gif?&width=415&height=415&newmaps=1&timelabel=1&timelabel.y=10&num=15&delay=50" width="338" height="400" frameborder="0" scrolling="no"></iframe></td>
</div>
</td>
</tr>
</table>
</html>
【问题讨论】:
-
首先,请修复您的html ...然后,我在您的sn-p中没有看到任何JS。你尝试了什么?
-
我确实在一秒钟前通过您的更正修复了它,谢谢。我没有把js放在那里,我很困惑,因为我发现很多答案都引用了PHP文件。我是新手,能走到这一步简直是个奇迹。在您看来,做我正在尝试的最简单的方法是什么
-
我之前尝试过 Meta 刷新,但它会重新加载整个页面。 JS 令人困惑,我无法弄清楚如何将其与刷新 Src 相关联。我拥有的 Src 是交通摄像头和气象雷达。第一帧活动 911 它不能一遍又一遍地重新加载。此页面适用于我们的消防站警报系统
-
我不明白你在问什么。你想重新加载所有的 iframe 吗?您的 HTML 代码仍有大约 33 个错误...您可以使用 validator.w3.org 帮助您找到它们。
-
是的,我想每 45 分钟刷新一次 Iframe 2、3、4、5、6、7,就是这样。感谢您提供的链接,我现在将使用它。