.Net Project/JavaScript

04장 태그내에서 자바스크립트 정의

Magic_kit 2009. 7. 30. 14:19
반응형



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>04장 태그내의 자바스크립트정의</title>
</head>

<input 
     type="button" value="버튼"
     style="background-color:Yellow;border:solid 1px red;"
     onclick="window.alert('잘하셨어요');"
     onmouseover="this.style.backgroundColor='green';"
     onmouseout="this.style.backgroundColor='yellow';"
/>
<body bgcolor="#ffcc99"> //배경색 지정    
</body>
</html>

Mouse Drag&Drop 에 관한 사용 예제)


 onmouseover="this.style.backgroundColor='green';"



  onmouseout="this.style.backgroundColor='yellow';"



onclick="window.alert('잘하셨어요');" 아래와 같은 이벤트 처리 방식으로 인해 사용

반응형