코딩_jquery
jquery 에서 url 알아내는 법
잠수콩
2018. 1. 3. 10:07
제목 : jquery 에서 url 알아내는 법
소스 :
jquery 에서 url 알아내는 법
var t1 = $(location).attr('host');
var t2 = $(location).attr('hostname');
var t3 = $(location).attr('href');
var t4 = $(location).attr('port');
var t5 = $(location).attr('protocol');
내용 :
t1=www.test.com:8080
t2=www.test.com
t3=http://www.test.com:8080/test/test/test_1.asp
t4=8080
t5=http:
예제 소스 파일 :
출처 :