Thuộc tính nodeValue trả về giá trị của nút (node). Cần chỉ định nút cụ thể (thường là text node con).
Ví dụ
<!DOCTYPE html>
<html>
<body>
<p>Lấy giá trị nút</p>
<button>Text nút Button</button>
<script>
var val = document.getElementsByTagName("BUTTON")[0];
var res = val.childNodes[0].nodeValue;
document.write("<br>Giá trị nút: " + res);
</script>
</body>
</html>