hasAttributes() 예제
<body> <button onclick="homzzang()">클릭</button> <p id="demo"></p> <script> function homzzang() { var x = document.body.hasAttributes(); document.getElementById("demo").innerHTML = x; } </script> </body> 결과보기
<body>
<button onclick="homzzang()">클릭</button>
<p id="demo"></p>
<script>
function homzzang() {
var x = document.body.hasAttributes();
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
결과보기
결과: true