`

常用的js 刷新页面的方法

阅读更多
	history.go(0);
	document.URL=location.href;
	location.assign(location);
	document.execCommand('Refresh');
	window.navigate(location);
	location.replace(location);//replace清空历史记录
	location.reload();
	location=location;

replace :在replace之后,浏览历史就被清空了。
href与assign方法会产生历史记录。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics