-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path12_window.html
More file actions
50 lines (42 loc) · 989 Bytes
/
12_window.html
File metadata and controls
50 lines (42 loc) · 989 Bytes
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>HTML Intro</title>
</head>
<script>
//Boolean, Number, String, Array, Object 5가지타입
/**
window
window.location
window.history
window.screen
window.navigarot
window.document
window.document.body
window.document.img
window.document.form
window.document.form.input
**/
var x =3 ;
var y =4 ;
window.alert(x+y) ; //window 생략가능
var a,b;
a = window.prompt("input a ", 0) ; //0 default value
b = prompt("input b ", 0) ;
console.log(a+b) ; //Stirng
console.log(parseInt(a)+parseInt(b)) ;
var c = parseInt("abc") ; // Returns NaN
console.log("c : ", c) ;
var d = parseInt("12abc") ; // Returns 12
console.log("d : ", d) ;
var answer = confirm("정말로 삭제하겠습니까?") ;
if(answer) {
alert("삭제됨") ;
}
</script>
<body>
<h1>https://developer.mozilla.org</h1>
<h1>여러분을 환영합니다!!</h1>
</body>
</html>