메뉴 건너뛰기

2016.12.22 20:30

도메인 체크

조회 수 5928 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

// 곧바로 현재 페이지 주소 출력
document.writeln(location.href);


// 변수에 넣어서 출력
var s = location.href;
document.writeln(s);

// 도메인
document.location.href.match(/http[s]*:\/\/([a-zA-Z0-9\-\.]*)/)[1]

var link =  document.location.href;
console.log(link);

// 파라미터
var para = document.location.href.split("?");
console.log(para);


하단 정보를 입력할 수 있습니다

© k2s0o1d4e0s2i1g5n. All Rights Reserved