• 회원가입
  • 로그인
  • 구글아이디로 로그인

[Window_Console] JS - console.clear() 메서드 - 콘솔 지우기 (=콘솔창 청소 = console.clear메서드 = 콘솔클리어 메서드)

구문

  1. console.clear() 예제 - 콘솔창 청소
  2. console.clear() 정의
  3. console.clear() 구문

 

console.clear() 예제 - 콘솔창 청소

 

<button onclick="homzzang()">Console 지우기</button>


<script>

console.log("홈짱닷컴 Homzzang.com");

function homzzang() {

  console.clear();

}

</script>

 

※ F12키 개발자 모드  켠 후, console 탭에서 확인 가능.

 

console.clear() 정의

 

Console(콘솔) 청소.

 

PS. 콘솔 띄우는 방법:  F12키 > Console 탭 클릭


 

1.

콘솔 청소 후, 'Console was cleared' 메세지 띄움.

 

2.

모든 브라우저 지원.

 

 

console.clear() 구문

 

console.clear()

 


[매개변수]

 

없음.

 


[반환값]

 

콘솔 청소 후, 'Console was cleared' 메세지 띄움. 

 



분류 제목
DOM_Element JS - exitFullscreen() 메서드 - 전체화면모드 닫기 (IE11 이상)
DOM_Element JS - firstChild 속성 ★ - 첫번째 자식노드
DOM_Element JS - firstElementChild 속성 - 첫번째 자식요소 (IE9 이상)
DOM_Element JS - focus() 메서드 ★ - 포커스 주기/설정. (= focus메서드 = 포커스메서드)
DOM_Element JS - getAttribute() 메서드 ★ - 요소의 속성명 (= 속성이름) 얻기
DOM_Element JS - getAttributeNode() 메서드 - 지정한 속성노드를 객체로 얻기
DOM_Element JS - getBoundingClientRect() 메서드 - 뷰포트 기준 요소크기와 요소위치 반환 (= g…
DOM_Element JS - getElementsByClassName() 메서드 - 클래스선택자 (= 클래스명선택자 = 클래스이…
DOM_Element JS - getElementsBy태그Name() 메서드 - 태그선택자 (= 요소선택자 = 태그명선택자 = 태…
DOM_Element JS - hasAttribute() 메서드 - 지정속성소유여부 (IE9 이상)
DOM_Element JS - hasAttributes() 메서드 - 속성소유여부 (IE9 이상)
DOM_Element JS - hasChildNodes() 메서드 - 자식노드유무 체크 (= hasChildNodes메서드 = 해…
DOM_Element JS - id 속성 = 아이디 설정/반환
DOM_Element JS - innerHTML 속성 ★ - 요소내용 설정/반환 (= innerHTML속성 = 이너에이치티엠엘속성…
DOM_Element JS - innerText 속성 ★★ - 요소의 텍스트(문자열) 내용과 모든 하위 항목 설정/반환. (= i…
DOM_Element JS - insertAdjacentElement() 메서드 - 지정요소를 지정위치에 삽입 (IE8 이상)
DOM_Element JS - insertAdjacentHTML() 메서드 ★ - HTML문자열을 지정위치에 삽입 (= inser…
DOM_Element JS - insertAdjacentText() 메서드 - 텍스트문자열을 지정위치에 삽입
DOM_Element JS - insertBefore() 메서드 - 기존자식노드 앞에 새 자식노드 삽입
DOM_Element JS - isContentEditable 속성 - 요소내용 편집가능여부 표시
28/67
목록
찾아주셔서 감사합니다. Since 2012