● document객체의 프로퍼티 > SCRIPT

본문 바로가기
사이트 내 전체검색

SCRIPT

● document객체의 프로퍼티

페이지 정보

본문

<body style="background-color:yellow; color:blue;" onload="printProperties()">


<h3>document 주요 프로퍼티</h3>

<hr>

<a href="http://www.naver.com">네이버</a>

<div>div 영역입니다.</div>

<input id="input2" type="text" value="여기에 포커스 있음">


<script>

var text = "문서 로딩 중일때 readyState = "+ document.readyState +"\n";


function printProperties(){

document.getElementById("input2").focus();


text += "1. location = "+document.location+" \n";

text += "2. URL = "+document.URL+" \n";

text += "3. title = "+document.title+" \n";

text += "4. head의 id = "+document.head.id+" \n";

text += "5. body color = "+document.body.style.color+" \n";

text += "6. domain = "+document.domain+" \n";

text += "7. lastModified = "+document.lastModified+" \n";

text += "8. defaultView = "+document.defaultView+" \n";

text += "9. 문서의 로드 완료 후 readyState= "+document.readyState+" \n";

text += "10. referrer = "+document.referrer+" \n";

text += "11. activeElement = "+document.activeElement.value+" \n";

text += "12. documentElement의 태그이름 = "+document.documentElement.tagName+" \n";


alert(text);

}

</script>

추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

사이트 정보

공지사항
자유게시판
질문답변
1:1문의

 

별명 : 터푸가위
주소 : 부산시 동래구 명장로20번길 90
대표 : 박규태
메일 : dancepkt@******.com

접속자집계

오늘
124
어제
285
최대
10,760
전체
277,730
Copyright © dancePKT . All rights reserved.