用js获取当前路由信息的方法

1,设置或获取对象指定的文件名或路径。dom alert(window.location.pathname) 2,设置或获取整个 URL 为字符串。post alert(window.location.href);url 3,设置或获取与 URL 关联的端口号码。对象 alert(window.location.port)blog 4,设置或获取 URL 的协议部分。字符串 alert(windo
相关文章
相关标签/搜索