이 IE4 DOM(문서 개체 모델)은 Microsoft Internet Explorer 브라우저 버전 4에 도입되었습니다. IE 5 이상 버전에는 대부분의 기본 W3C DOM 기능에 대한 지원이 포함되어 있습니다.
예시
W3C DOM 메서드를 사용하여 문서 속성에 액세스하려면 다음 코드를 실행해 보세요.
<html>
<head>
<title> Document Title </title>
<script type="text/javascript">
<!--
function myFunc() {
var ret = document.getElementsByTagName("title");
alert("Document Title : " + ret[0].text );
var ret = document.getElementById("heading");
alert(ret.innerHTML );
}
//-->
</script>
</head>
<body>
<h1 id="heading">This is main title</h1>
<p>Click the following to see the result:</p>
<form id="form1" name="FirstForm">
<input type = "button" value = "Click Me" onclick = "myFunc();" />
<input type = "button" value = "Cancel">
</form>
<form d="form2" name="SecondForm">
<input type = "button" value = "Don't ClickMe"/>
</form>
</body>
</html>