본문 바로가기

Javascript

아주아주 간단한 마우스오버 event

반응형

 

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<style type="text/css">

 

.textarea_css{                  /* textarea 지정한 칸이 넘어야 스크롤바 생성 및 크기 설정*/
 overflow-x: hidden; 
 overflow-y:auto;
 height:100px;
 width:300px;
}

</style>
<script type="text/javascript">

function over(x) {             // 마우스오버시 실행
  x.style.border = "solid 1px #E59AB8";
 }
 
 function out(x) {             //마우스아웃시 실행
   x.style.border = "solid 1px #d5d5d5";
  }

</script>
</head>
<body>

<textarea class="textarea_css" name="issue" onmouseover="over(this)" onmouseout="out(this)" ></textarea>

</body>

</html>

 

 

 

 

반응형