# jQuery 소스
console.log("url1 : "+$(location).attr('href'));
console.log("protocol : "+$(location).attr('protocol'));
console.log("host : "+$(location).attr('host'));
console.log("pathname : "+$(location).attr('pathname'));
console.log("search : "+$(location).attr('search'));
# 출력결과
url1 : http://localhost:8080/msac/main.do?ddd=ddd
protocol : http:
host : localhost:8080
pathname : /msac/main.do
search : ?ddd=ddd