I won’t say much nonsense, I will just work for everyone. You know my style. .
The key code is as follows:
function changeURLPar(destiny, par, par_value){var pattern = par+'=([^&]*)';var replaceText = par+'='+par_value;if (destiny.match(pattern)){var tmp = '///'+par+'=[^&]*/';tmp = destiny.replace(eval_r(tmp), replaceText);return (tmp);}else{if (destiny.match('[/?]')){return destiny+'&'+ replaceText;}else{return destiny+'?1=1&'+replaceText;}}return destiny+'/n'+par+'/n'+par_value;}Dynamically change the address bar content with JS window.location.href window.location.hash
Use window.location.hash to change the address bar content without committing it like changing the wndow.location.href.
After changing the hash, #,,,, will be added to the address bar. This can solve the location of the page in AJAX without refresh, and can also complete the interface effects in some refresh states, making good use of the promising future. A good thing.