- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- 현재 작성하고 있는 파일은 UTF-8 DOS파일입니다.-->
- <html xmlns="http://www.w3.org/1999/xhtml" lang="ko">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <div id="ex_js_syntax">
- <script type="text/javascript" language="javascript">
- <!--
- function window_alert(){
- /* 윈도우 알림창 => alert(문자열) */
- alert("알림창 눌렀어요");
- document.getElementById("window_alert").innerHTML = "알림창";
- }
- //-->
- </script>
- <form name="input_type" id="input_type" method="post" >
- <!-- 예제 박스에선 안됨 => form태그안에 form태그있으면 지워짐~ㅠ.ㅠ -->
- 윈도우 => 알림창 <br />
- <p id="window_alert" onclick="window_alert();">window객체-메서드 alert()[클릭]</p>
- </form>
- </div>
- </body>
- </html>
--------------------------------------------------------------------------------------------
위 소스 예제 보기
윈도우 알림창 => alert(문자열)
window 속성 보기(접어두었습니다.)
출처 & 인용 - http://www.w3schools.com/
'javascript > window()객체' 카테고리의 다른 글
window객체 open() close() 창 열고 닫기 (0) | 2014.02.08 |
---|---|
window객체 print() 프린트 (0) | 2014.02.08 |
window객체 prompt() 질문창 (0) | 2014.02.07 |
window객체 confirm() 확인창 (0) | 2014.02.07 |
window객체 속성, 메소드 리스트 (0) | 2014.02.07 |