转载知乎文章链接
window.location.href → 'https://www.jianshu.com/search?q=JS#comments'
.origin → 'https://www.jianshu.com'
.protocol → 'https:'
.host → 'www.jianshu.com'
.hostname → 'www.jianshu.com'
.port → ''
.pathname → '/search/'
.search → '?q=JS'
.hash → '#comments'
window.location.assign('url')
.replace('url')
.reload()
.toString()