WON.dev
chapter05 : 마우스_이벤트 본문
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
onload = function(){
var box = document.querySelector("#box");
box.onmouseover = function(){
this.innerHTML = "안녕하세요";
}
box.onmouseout = function(){
box.innerHTML = "안녕히가세요";
}
}
</script>
</head>
<body>
<div id="box">마우스 올리기</div>
</body>
</html>
'WEB.JS > 10.EVENT_JS' 카테고리의 다른 글
chapter03 : 이벤트_객체 (0) | 2023.05.22 |
---|---|
chapter04 : 디폴트_이벤트 (0) | 2023.05.22 |
chapter06 : 키보드_이벤트 (0) | 2023.05.22 |
chapter07 : 키보드_이벤트 (0) | 2023.05.22 |
chapter : JOIN_JS (0) | 2023.05.22 |