반응형
<script type="text/javascript">
// 곧바로 현재 페이지 주소 출력
document.writeln(location.href);
// 변수에 넣어서 출력
var s = location.href;
document.writeln(s);
</script>
iframe으로 걸었을 경우 함수 호출 위치에 따라 iframe의 값을 가져온다.
// 곧바로 현재 페이지 주소 출력
document.writeln(location.href);
// 변수에 넣어서 출력
var s = location.href;
document.writeln(s);
</script>
iframe으로 걸었을 경우 함수 호출 위치에 따라 iframe의 값을 가져온다.
반응형
'Web Programing' 카테고리의 다른 글
OAuth 인증방식의 이해 Ⅰ : 용어 정리 및 사용자 관점에서의 OAuth (0) | 2011.10.27 |
---|---|
HTML 폰트 종류 (0) | 2011.09.02 |
트위터, 페이스북에 링크 공유하기 (0) | 2011.09.02 |
Javascript 로 특정 날짜 구하기. (0) | 2011.07.29 |
모바일 웹사이트(mobile website) 제작 관련 userAgent 를 통한(device 구분) 원하는 주소로 포워딩 [출처] 모바일 웹사이트(mobile website) 제작 관련 userAgent 를 통한(device 구분) 원하는 주소로 포워딩|작성자 문피쉬 (0) | 2011.02.23 |