Sponsored Ad

Tuesday, April 13, 2010

How To Refresh Webpage Using JavaScript

 

This Sample code illustrate you that how to refresh web page using JavaScript code.  the function refresh() refresh the page every time its called. You can call it whenever page refresh is needed.

Here its called at body load. Whenever user will click on refresh button the body will load and function get called.

<html>
<head>
<script type="text/javascript">
function load()
{
setTimeout("refresh()", 3000)
}
function refresh(){
window.location.reload()
load()
}
</script>
</head>
<body onload="load()">
<form>
<input type="button" value="Click here to Refresh Page">
</form>
</body>
</html>

No comments:

Post a Comment

Sponsored Ad

Development Updates