1.重新刷新页面使用window.location.reload
//模态框中右上角关闭图标点击刷新页面
$("#refresh-box .close").click(function() {
window.location.reload();
})window.location.reload
2.打开新页面使用window.location.herf
window.location.href = "https://bjtest.xdf.cn/passport//user/detail";

这篇博客介绍了两种常见的网页操作:使用JavaScript的`window.location.reload()`函数实现页面刷新,以及通过`window.location.href`属性打开新的页面链接。这些技巧在前端开发中经常被用于用户交互和页面导航。
785

被折叠的 条评论
为什么被折叠?



