Javascript : How to refresh page with JQuery ?
Sometimes, easy thing such as refreshing a page with javascript or jquery is the hardest thing to remember. To refresh a page with JQuery, use this code fragment below :
$('#yourbuttonid').click(function() {
location.reload();
});
Options that you might to know about
location.reload(false) - Default setting and will reload the current page from the cache.
location.reload(true) - Force a reload from the server.
By Adam Ng
IF you gain some knowledge or the information here solved your programming problem. Please consider donating to the less fortunate or some charities that you like. Apart from donation, planting trees, volunteering or reducing your carbon footprint will be great too.
Advertisement
Tutorials
+17.9k Golang : Simple client server example
+11.9k Golang : Convert(cast) bigint to string
+12.7k Golang : Remove or trim extra comma from CSV
+11.9k Golang : How to parse plain email text and process email header?
+9k Golang : Go as a script or running go with shebang/hashbang style
+8.4k Your page has meta tags in the body instead of the head
+12.9k Python : Convert IPv6 address to decimal and back to IPv6
+15k Golang : Search folders for file recursively with wildcard support
+8.2k Golang : Qt splash screen with delay example
+15.4k Golang : Find location by IP address and display with Google Map
+7.3k Golang : Calculate how many weeks left to go in a given year
+12.7k Golang : zlib compress file example