Java Script2012. 11. 6. 06:16

메서드 : 오브젝트에 대한 처리를 정리한 것. 메서드를 호출하면 오브젝트에 대한 처리를 명령할 수 있다.


메서드 실행하기

window.alert() : 경고 대화상자를 표시

window.document.write() : 문자열을 출력


<html>

<head><title>메서드</title>

<meta http-equiv="Content-Script-Type" content="text/javascript">

<body>

버튼을 더블 클릭하세요.<br>

<input type="button" value="버튼"

ondblclick="alert('perfect')">

</body>

</html>

'Java Script' 카테고리의 다른 글

7. 기초 응용  (0) 2012.11.06
6. 파일 불러오기  (0) 2012.11.06
4. 프로퍼티  (0) 2012.11.06
3. 브라우저 오브젝트  (0) 2012.11.06
2. JavaScript 호출 방법  (0) 2012.11.06
Posted by 멜데스