例如地址: http://www.juuyou.com:8080/test.html?aaa=bbb
document.location.protocol — http:
document.location.hostname — www.juuyou.com
document.location.host — www.juuyou.com
document.location.port — :8080
document.location.pathname — /test.html
document.location.hash — #dddd
document.location.search — ?aaa=bbb