728x90

$(location).attr('href') 

를 하면 현재 페이지의 주소를 가져올 수 있다.

 

$(location).attr('href').split(".")[0];

split()을 이용해서 받아온 값을 다듬으면 된다. ( . , //, : 등등)

 


http://www.tcpschool.com/javascript/js_bom_location

 

728x90

+ Recent posts