Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个div带有 html 表的标签,它动态获取数据。
div
我想每 5 秒刷新一次 div 标签。
任何人都可以帮助我知道是否有 div 标签的属性来刷新它?
实现这一点的正确方法是使用 HTML5 expando 属性“data-”,然后在您的 JavaScript 函数中,您可以从 expando 属性中获取值并刷新 div 内容。通过这种方式,您可以使刷新间隔可配置。