nodeValue 속성은 노드 값을 가져오는 데 사용됩니다. 노드를 지정해야 합니다.
예시
다음 코드를 실행하여 nodeValue 속성을 얻는 방법을 배울 수 있습니다.
<!DOCTYPE html>
<html>
<body>
<p>Get the node value</p>
<button>Demo Button Text</button>
<script>
var val = document.getElementsByTagName("BUTTON")[0];
var res = val.childNodes[0].nodeValue;
document.write("<br>Node Value: "+res);
</script>
</body>
</html>