by Nathan
현재 URL 확인하기 본문
1. javascript
location.href : http://localhost:8080/test/main.do?param=value
location.protocol : http:
location.host : localhost:8080
location.pathname : /test/main.do
location.search : ?param=value
2. jquery
$(location).attr('href') : http://localhost:8080/test/main.do?param=value
$(location).attr('protocol') : http:
$(location).attr('host') : localhost:8080
$(location).attr('pathname') : /test/main.do
$(location).attr('search') : ?param=value
'Programming > JavaScript, Json' 카테고리의 다른 글
반복문 4가지 (0) | 2017.03.17 |
---|---|
테이블 동적 생성 (0) | 2016.10.25 |
[유효성]필수값 체크 (0) | 2016.09.06 |
[유효성]자바스크립트 함수 (0) | 2016.09.05 |
jSon ajax (0) | 2015.05.10 |
Comments