how can refresh current page automatically, without press
any button and anchor tag.
Answer Posted / ramesh
To refresh a page after a pre-defined time, without pressing
any button ot anchor tag, you can use the follwing:
var t=setTimeout("javascript statement",milliseconds);
The setTimeout() method returns a value - In the statement
above, the value is stored in a variable called t. If you
want to cancel this setTimeout(), you can refer to it using
the variable name.
window.location.reload();
var t=setTimeout("window.location.reload()",5000);
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
Can we use php variable in javascript?
Is php object oriented?
What is a query give example?
What is session in PHP. How to remove data from a session?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
What is the difference between "echo" and "print" in php?
What is $_ get in php?
Is php faster than javascript?
How a variable is declared in php?
Why php 7 is faster?
Do you know what does mvc stand for and what does each component do?
how to track user logged out or not? when a user is idle?
What is the use of $_server and $_env?
Does wordpress run on php 7?
How to Retrieve the Session ID of the Current Session?