<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<style>
#imgBig{ width:300px; height:300px;
border:2px solid blue;
}
</style>
<script type="text/javascript">
var img0; //전역 변수 선언
var img1;
var img2;
var imgBig;
var no=0 ;
window.onload=function(){
img0=document.getElementById("img0") //전역 변수 초기화
img1=document.getElementById("img1")
img2=document.getElementById("img2")
imgBig=document.getElementById("imgBig")
img0.onmouseover=function(){
imgBig.src=img0.src;
}
img1.onmouseover=function(){
imgBig.src=img1.src;
}
img2change=function(){ //함수에 이름을 붙여줌
imgBig.src=img2.src;
}
img2.onmouseover=img2change;
setTimeout(function(){
imgBig.src= img0.src;
} , 1000); //1초 뒤에 after를 실행해라.
}
aft=function(){
imgBig.src= img0.src;
}
d = function dialog(){
alert("안녕");
}
</script>
</head>
<body>
<img id="img0" src="http://www.w3schools.com/images/compatible_ie.gif">
<img id="img1" src="http://www.w3schools.com/images/compatible_firefox.gif">
<img id="img2" src="http://www.w3schools.com/images/compatible_opera.gif">
<br />
<img id="imgBig" src="" />
</body>
</html>