F5 reload หรือ Refresh หน้าเว็บด้วย Javascript และ HTML
Javascript ใช้
ถ้าเป็น html ใช้ meta
โค้ด: เลือกทั้งหมด
<meta http-equiv="refresh" content="60;url=https://www.mindphp.com"/>
ตัวอย่าง
โค้ด: เลือกทั้งหมด
<html>
<head>
<title>F5 reload หรือ Refresh หน้าเว็บด้วย Javascript และ HTML</title>
<script langauge="javascript">
window.location.reload();
</script>
</head>
<body>
</body>
</html>
หรือจะใช้
โค้ด: เลือกทั้งหมด
<meta http-equiv="refresh" content="60;url=https://www.mindphp.com"/>
แทน
โค้ด: เลือกทั้งหมด
<script langauge="javascript">
window.location.reload();
</script>
ก็ได้ครับ