Search notes:
DOM example: nodeType
nodeType
is a property of the
Node
interface.
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<title>setAttribute()</title>
<script type="text/javascript">
function main() {
var out = document.getElementById('out');
out.innerHTML += 'document.nodeType: ' + document.nodeType + '<br>';
out.innerHTML += 'element.nodeType: ' + out.nodeType + '<br>';
}
</script>
</head>
<body onload='main()'>
<div id='out' style='background-color:yellow; font-family:monospace'>
</div>
</body>
</html>