HTML DOM Code 객체
Code 객체
Code 객체는 HTML <code> 요소를 대표합니다。
Code 객체 접근
getElementById()를 사용하여 <code> 요소에 접근할 수 있습니다:
var x = document.getElementById("myCode");
Code 객체 생성
document.createElement() 메서드를 사용하여 <code> 요소를 생성할 수 있습니다:
var x = document.createElement("CODE");