Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since июль 2015 г..
Свойство Node.nodeValue возвращает или устанавливает значение текущего узла.
value это строка содержащая значение текущего узла, если таковой имеется.
Для самого документа, nodeValue возвращает null. Для текста, комментария и CDATA узлов, nodeValue возвращает содержимое узла. Для узла атрибута, вернётся значение атрибута.
Следующая таблица, показывает возвращаемые значения различных элементов:
| CDATASection | Содержимое секции CDATA |
| Comment | Содержимое комментария |
| Document | null |
| DocumentFragment | null |
| DocumentType | null |
| Element | null |
| NamedNodeMap | null |
| EntityReference | null |
| Notation | null |
| ProcessingInstruction | Все содержимое исключая цель |
| Text | Содержимое текстового узла |
Когда nodeValue равно null, установки не имеют эффекта.
This page was last modified on 17 дек. 2024 г. by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.