How to automatically refresh ejs page

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 07:50:32

问题


Im new with ejs. As I was trying out an app. I want to refresh the page every 5 sec.

I got a code

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

But how to include jquery in ejs? How to embed this code in ejs page?


回答1:


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.



来源:https://stackoverflow.com/questions/15287189/how-to-automatically-refresh-ejs-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!