JavaScript

[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' 메세지 띄움. 

 



분류 제목
Window_Object JS - window 객체 - 윈도우객체 (속성/메서드) 종류
API_Storage JS - Storage Object - 스토리지 객체 (※ 데이터 저장소)
Object JS - Object Constructor - 객체생성자종류 ★
Object JS - Object Prototypes - 객체프로토타입 (= 객체원형) ★
Object JS - object ECMAScript 5 - 객체혁명
DOM_Attribute JS - attr.isId -
DOM_Attribute JS - attr.name -
DOM_Attribute JS - attr.value -
DOM_Attribute JS - attr.specified -
DOM_Attribute JS - nodemap.getNamedItem() 메서드 -
DOM_Attribute JS - nodemap.item() 메서드 -
DOM_Attribute JS - nodemap.length -
DOM_Attribute JS - nodemap.removeNamedItem() 메서드 -
DOM_Attribute JS - nodemap.setNamedItem() 메서드 -
Window_Console JS - console.assert() 메서드 - 표현식이 FALSE인지 확인 (= 표현식 거짓 여부 체크 …
30/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티 3
웹유틸
회원센터
홈짱닷컴 PC버전 로그인