For url http://localhost:8080/posts?author=101#section2

window.location.hash: "#section2"

window.location.host: "localhost:8080"

window.location.hostname: "localhost"

window.location.href: "http://localhost:8080/posts?author=101#section2"

window.location.origin: "http://localhost:8080"

window.location.pathname: "/posts"

window.location.port: "8080"

window.location.protocol: "http:"

window.location.search: "?author=101"