게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
HTML 자바스크립트 질문이용..!
게시물ID : programmer_20721짧은주소 복사하기
작성자 : 영히밍니
추천 : 0
조회수 : 377회
댓글수 : 2개
등록시간 : 2017/05/31 22:14:57
<!DOCTYPE html>
<html>
<head>
<title>Jayun's Home</title>
<link rel ="stylesheet" type = "text/css" href = "myhome.css">
</head>
<body>

<br><br><br><br><br>
<center><img src = "Main.jpg"></center>
<div id = "event"><span id = "motto">"Always keep the faith"</span>
<img src = "mottoex.png" id = "mottoex" visibility = "hidden"></div>
<script type = "text/javascript">
document.getElementById("event").onmouseover = mottoexplain;
  function mottoexplain(){
var dom = document.getElementById(mottoex);
dom.visibility = "visible";
}
</script>
</body>
</html>

div id = "event" 쪽에 마우스를 올려 두면 mottoex.png의 hidden이 visible로 바뀌어 사진이 뜨도록 하고 싶은데

Uncaught TypeError: Cannot set property 'visibility' of null

이런 오류가 자꾸떠용...왜일까요ㅠㅠ
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호