javascript刷新当前页面的几种方式

这里总结一下JavaScript刷新当前页面的几种方式。

1.history对象。

history.go(0);

2.location对象。

location.reload();
location = location;
location.assign(location);
location.replace(location);

3.document对象。

document.execcommand(refresh);
document.all.webbrowser.execwb(22, 1);

4.window对象。

window.open(location, '_self');
window.navigate(location);

"绚烂的烟花是美的,只是终究落回了地平线。"

原文地址:https://www.cnblogs.com/yanggb/p/11269336.html