Showing
3 changed files
with
21 additions
and
12 deletions
| 1 | <html> | 1 | <html> |
| 2 | <head> | 2 | <head> |
| 3 | -<script type="text/javascript"> | ||
| 4 | -function message(){ | ||
| 5 | -alert("This alert box was called with the onload event"); | ||
| 6 | -} | ||
| 7 | -</script> | ||
| 8 | </head> | 3 | </head> |
| 9 | 4 | ||
| 10 | -<body onload="message()"> | 5 | + |
| 11 | <script type="text/javascript"> | 6 | <script type="text/javascript"> |
| 12 | document.write("This message is written by JavaScript"); | 7 | document.write("This message is written by JavaScript"); |
| 13 | </script> | 8 | </script> | ... | ... |
10_JavaScriptForWebBrowser/05 UserInput.html
0 → 100644
| 1 | -//window객체는 window. 생략 가능 | 1 | +//window객체는 window. 생략 가능 |
| 2 | -alert("test"); // 메시지 창 띄움 | 2 | +alert("test"); // 메시지 창 띄움 |
| 3 | 3 | ||
| 4 | -window.open('','','width=200,height=100') // 새창 띄우기 | 4 | +window.open('','','width=200,height=100') // 새창 띄우기 |
| 5 | 5 | ||
| 6 | if (confirm("Are you sure?")) { | 6 | if (confirm("Are you sure?")) { |
| 7 | - // Yes/No를 묻는 다이얼로그 창 띄움. Yes일 때만 true | 7 | + // Yes/No를 묻는 다이얼로그 창 띄움. Yes일 때만 true |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | -var name = prompt("Enter name"); // 사용자의 입력 받는 창 띄움 | 10 | +var name = prompt("Enter name"); // 사용자의 입력 받는 창 띄움 |
| 11 | - | ... | ... |
-
Please register or login to post a comment