js怎么返回上一页
直接返回上一页的方法有以下几种:使用浏览器内置的 history.back() 方法:history.back();使用 window.location 对象:window.location.href = document.referrer;创建自定义按钮,并使用 window.history.back() 方法返回上一页。
如何使用 JavaScript 返回上一页
直接返回上一页
最简单的方法是使用浏览器内置的 history.back() 方法:
history.back();
发表评论