|
 |
 |
การ Refresh หน้าต่างเว็บเพจ ด้วย Java Script |
แบบที่ 1
<!-- Codes by Quackit.com -->
<a href="javascript:location.reload(true)">Refresh this page</a>
|
| ต.ย.
Refresh this page
|
Auto-Refresh
<!-- Codes by Quackit.com -->
<html>
<head>
<script type="text/JavaScript">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout("location.reload(true);",timeoutPeriod);
}
// -->
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
<p>This page will refresh every 5 seconds. This is because we're using the 'onload' event to call our function. We are passing in the value '5000', which equals 5 seconds.</p>
<p>But hey, try not to annoy your users too much with unnecessary page refreshes every few seconds!</p>
</body>
</html>
|
| ต.ย.
[ ยังไม่มี ] |
อ้างอิงจาก http://www.quackit.com/javascript/javascript_refresh_page.cfm
|
| |
|
|
|