| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/API/Node/nodeName | [Back] [Original] |
Get to know MDN better
AttrCDATASection"#cdata-section"
Comment"#comment"
Document"#document"
DocumentFragment"#document-fragment"
DocumentTypeElementElement.tagName HTML XML SVG MathML
ProcessingInstructionText"#text"
HTML
<div id="d1">Hello world</div>
<!-- -->
<span></span> <br />
<svg height="20" width="20">
<circle cx="10" cy="10" r="5" stroke="black" stroke-width="1" fill="red" />
</svg>
<hr />
<output id="result"></output>
let node = document.querySelector("body").firstChild;
let result = ":<br/>";
while (node) {
result += `${node.nodeName}<br/>`;
node = node.nextSibling;
}
const output = document.getElementById("result");
output.innerHTML = result;
| DOM # ref-for-dom-node-nodename |
NodeAbortControllerAbortSignalAbstractRangeAttrCDATASectionCharacterDataCommentCustomEventDOMErrorDOMExceptionDOMImplementationDOMParserDOMTokenListDocumentDocumentFragmentDocumentTypeElementEventEventTargetHTMLCollectionMutationObserverMutationRecordNamedNodeMapNodeIteratorNodeListProcessingInstructionQuotaExceededErrorRangeShadowRootStaticRangeTextTreeWalkerXMLDocumentXPathEvaluatorXPathExpressionXPathResultXSLTProcessor| Web Proxy Viewer | New URL | Original Page |