Detecting Back Button/Hash Change in URL
问题 I just set up my new homepage at http://ritter.vg. I\'m using jQuery, but very minimally. It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. //general functions function getUrl(u) { return u + \'.html\'; } function loadURL(u) { $.get(getUrl(u), function(r){ $(\'#main\').html(r); } ); } //allows bookmarking var hash = new String(document.location).indexOf(\"#\"); if(hash > 0) { page = new String(document.location).substring(hash + 1); if