• 회원가입
  • 로그인
  • 구글아이디로 로그인

[DOM_Element] JS - hasAttributes() 메서드 - 속성소유여부 (IE9 이상)

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>

 

결과보기

결과: true

 

방문 감사합니다. (즐겨찾기 등록: Ctrl + D)

분류 제목
게시물이 없습니다.
목록
찾아주셔서 감사합니다. Since 2012