javascript - 如何每 2 分钟刷新一次 html 页面?

标签 javascript ajax html

<分区>

我目前在我的 iOS 和 Android 应用程序中使用 html 页面作为 webview。我不想更新 native 代码,想知道是否可以每 2 分钟刷新一次 index.html 主页?可能吗?

最佳答案

您可以使用:

<meta http-equiv="refresh" content="120">

The <meta http-equiv="refresh"> tag causes a web page to refresh automatically after a specified amount of time. Users generally don't expect automatic refreshes, so they can be disorienting. Refreshing also moves focus to the top of the page, which may frustrate or confuse users, particularly those who rely on screen readers or other assistive technologies.

关于javascript - 如何每 2 分钟刷新一次 html 页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29995292/

相关文章:

javascript - 事件不限

javascript - 是否有可能在 rails 3.0 中有一个 js.erb 部分?

ajax - IIS 上的长轮询

c# - 如何在 C# 中从 HTML 字符串操作 DOM?

html - 在达到最大高度之前显示滚动条

javascript - UI-路由器 : State redirecting to first child on page refresh

javascript - 如何将es6 Promise中的变量传递然后回调到外部

javascript - 如何动态添加多个HTTP header

html - html中的背景高度

javascript - 使用appendchild或其他方法向ul添加html代码而不是纯文本?