3초기억력

jquery 에서 url 알아내는 법 본문

코딩_jquery

jquery 에서 url 알아내는 법

잠수콩 2018. 1. 3. 10:07
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.



제목 : 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:





예제 소스 파일 :


 출처 :  




Comments