JS有时候需要实现页面跳转,那么可以直接在某个事件触发中设置 location.href="/user/center/" 这样即可实现页面跳转。 获取当前页面地址可以直接这样 var href=location.href 转载于:https://www.cnblogs.com/Deaseyy/p/10859859.html