page 46 그대로 따라 작성한 후 이미지 파일을 같은 폴더에 ElvisPresley.png 이미지 넣은 후 html 작성해 봤더니 마우스 올려대도 이미지가 안나오네요.
혹시 제가 잘못 작성한게 있을까요?
<!DOCTYPE html>
<html>
<head>
<title>웹 페이지의 구성 요소</title>
<style>
body {background-color: linen; color : green;
margin-left: 40px; margin-right: 40px;}
h3 { text-align: center; color : darkred; }
hr {height: 5px; border : solid grey;
background-color: grey}
span{color : blue; font-size: 20px;}
</style>
<script>
function show(){
document.getElementById("fig").src="ElvisPresley.png";
}
function hide(){
document.getElementById("fig").src"";
}
</script>
</head>
<body>
<h3 onmouseover = "show()" onmouseout="hide()">
Elvis Presley</h3>
<hr>
<div><img id="fig" src=""></div>
He was an American singer and actor. In November
1956, he made his film debut in <span>Love Me
Tender</span>. He is often referred to as
"<span>the King of Rock and Roll</span>"
</body>
</html>
c드라이브 web폴더를 만들어 거기에 html과 이미지 파일 같이 넣어놨습니다