Notice
Recent Posts
Recent Comments
Link
«   2024/06   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Tags
more
Archives
Today
Total
관리 메뉴

WON.dev

chapter05 : 마우스_이벤트 본문

WEB.JS/10.EVENT_JS

chapter05 : 마우스_이벤트

GAWON 2023. 5. 22. 09:21
<!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