<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.0.min.js"></script>
<script>
$(function(){
$(".box").mouseenter(function(){
$(".word").text("마우스 포인터가 안에 있습니다.");
});
$(".box").mouseleave(function(){
$(".word").text("마우스 포인터가 밖에 있습니다.");
});
});
</script>
</head>
<body>
<div class="box" style="width:200px; background:indianred"></div>
<p class="word">박스에 마우스 포인터를 올리고 내려보세요.</p>
</body>
</html>
이거 왜 박스 생성 안됨?
댓글 0