3

我是 ejs 新手。当我尝试一个应用程序时。我想每 5 秒刷新一次页面。

我有一个代码

<script language="javascript" type="text/javascript">
        $(document).ready(function() {
            setInterval("location.reload(true)", 5000);
        });   
</script>

但是如何在 ejs 中包含 jquery?如何将此代码嵌入到 ejs 页面中?

4

1 回答 1

4

Try this

tags: <meta http-equiv="refresh" content="5">. That simple. The "5" is the number of seconds. If you want to increase the time to say 20 minutes, you simply put in "1200" and so on.

于 2013-04-05T06:43:13.580 回答