-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathno1.html
35 lines (27 loc) · 837 Bytes
/
no1.html
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
<!DOCTYPE html>
<html>
<head>
<script>
window.alert("hello");
document.write("HHHH")
// undefined
var num = 5;
document.write(typeof(num))
document.write("<br>")
num = undefined;
document.write(typeof(num))
document.write("<br>")
// boolean
document.write(null === undefined)
// datatype of array
var arr = ['a', 'b', 'c']
document.write(typeof(arr))
</script>
</head>
<body>
<h2>What Can JavaScript Do?</h2>
<p id="demo">JavaScript can change the style of an HTML element.</p>
<button type="button" onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>
<button type="button" onclick="document.write('HTML Destoryed!')">Destory the html</button>
</body>
</html>