Prev Demo
JavaScript
>
Refreshing Current Page
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <h1>Reload current page</h1> <script> document.write(new Date()); function TestFunction() { location.reload(); } </script> <br> <input type="button" id="btnReload" value="Reload" onclick="TestFunction()" /> <p><strong>Note:</strong> Click the button to reload the current page.</p> </body> </html>
Note: We DO NOT save your trial code in our database.
Output