
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is nodeValue Property in JavaScript HTML DOM
The nodeValue property is used to get the node value. You need to specify the node.
Example
You can try to run the following code to learn how to get nodeValue property.
<!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>
Advertisements