Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说window.location.href刷新页面[通俗易懂],希望能够帮助你!!!。
刷新当前页
window.location.href=window.location.href;
或者
window.location.href="当前URL",例如
window.location.href="http://www.hao123.com/indexnt.html";
PS:如果不考虑window.location.href,可以直接使用
window.location.reload();刷新
上一篇
已是最后文章
下一篇
已是最新文章