노드 유형 nodeType

4793 단어
DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>    nodeTypetitle>
    
head>
<body>
    <div><h3>nodeType   h3><strong>       ele.nodeType    strong><br /><br /><img src="../img/nodeType.png" alt="">div>
    <script>
        var div=document.getElementsByTagName("div")[0];//  div  
        console.log(div.nodeType);//  div      
    script>
body>
html>

좋은 웹페이지 즐겨찾기