1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <!-- 현재 작성하고 있는 파일은 UTF-8 DOS파일입니다.-->
  3. <html xmlns="http://www.w3.org/1999/xhtml" lang="ko">
  4.   <head>
  5.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6.   </head>
  7.   <body>
  8.      <div id="ex_js_syntax">
  9.       <script type="text/javascript" language="javascript">
  10.       <!--
  11.         /* Mouse Events onclick ondblclick onmousedown 
  12.         onmouseup onmousemove onmouseover onmouseout  */
  13.         function onmousemove_event(){
  14.           /* onmousemove 이벤트 */
  15.           alert("onmousemove 실행되였어요");
  16.         }
  17.         function onmouseover_event(){
  18.           /* onmouseover 이벤트 */
  19.           alert("onmouseover 실행되였어요");
  20.         }
  21.         function onmouseout_event(){
  22.           /* onmouseout 이벤트 */
  23.           alert("onmouseout 실행되였어요");
  24.         }
  25.       //-->
  26.       </script>
  27.       <form name="input_type" id="input_type" method="post" >
  28.       <!-- 예제 박스에선 안됨 => form태그안에 form태그있으면 지워짐~ㅠ.ㅠ -->
  29.         <input type="text" value="마우스 커서 이동시" onmousemove="onmousemove_event();">
  30.         <br />
  31.         <input type="text" value="마우스 커서 얻을때" onmouseover="onmouseover_event();">
  32.         <br />
  33.         <input type="text" value="마우스 커서 잃을때" onmouseout="onmouseout_event();">
  34.         <br />
  35.       </form>
  36.     </div>
  37.   </body>
  38. </html>

--------------------------------------------------------------------------------------------

위 소스 예제 보기


onmousemove onmouseover onmouseout 


onmousemove - 마우스 커서 해당 태그범위에서 이동시 이벤트가 발생합니다.

onmouseover - 마우스 커서 해당 태그범위에서 올때 이벤트가 발생합니다.

onmouseout - 마우스 커서 해당 태그범위에서 벗어날때 이벤트가 발생합니다.


출처 & 인용 - http://www.w3schools.com/

:
BLOG main image

공지사항

카테고리

분류 (356)
main (1)
php5 (218)
HTML (36)
javascript (93)
IT 이론과 퍼온정보 (8)
깨작일상 (0)
곧 추가할 내용 (0)
추후 알아볼것들... (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

달력

«   2024/03   »
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
31
Total :
Today : Yesterday :