| 
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 | 
<!DOCTYPE> 
<html> 
<head> 
    <script src="http://code.jquery.com/jquery-latest.js"></script> 
    <title>Jquery 세상에 오신것을 환영 합니다.</title> 
    <script type="text/javascript"></script> 
    <script> 
        $(document).ready(function () { 
            alert('홈페이지에 방문해주셔서 감사합니다'); 
        }); 
    </script> 
</head> 
<body> 
    <input type="button" id="hideButton" value="숨기기" /> 
    <script> 
    $('#hideButton').click(function () { 
        $('#hideButton').hide(); 
    }); 
    </script> 
</body> 
</html> | cs | 
웹 페이지를 접속할때 alert에서 홈페이지에 방문해주셔서 감사합니다.창이 뜨고
숨기기라는 버튼을 생성하여 
클릭하면 숨겨지도록 하였다.
| 
1 
2 
3 
4 
5 | 
<script> 
    $('#hideButton').click(function () { 
        $(this).hide(); 
    }); 
    </script> | cs | 
위코드와 아래코드는 같다
this는 클릭이 되어진 놈을 말한다 ㅋㅋ
C++같은 언어를 해봤다면 쉽게 알 수있다.
댓글
댓글 쓰기