forked from barcode-network/lesson-01
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (50 loc) · 995 Bytes
/
index.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!Doctype Html>
<html>
<head>
<!-- This is interpreted by the browser so it knows what to include in this file. It is not displayed to the user -->
<!-- JS, CSS files -->
<style>
h1{
color:red;
text-decoration:underline
}
/* Select a class using . */
.location{
color:blue
}
/* Select a id using # */
#sampleText{
color:#fff
}
</style>
<script>
function randomFunc(){
const sampleText = document.getElementById('sampleText').innerHTML
/* sampleText = 'Dog President' */
alert(sampleText)
}
function findText(value){
alert(value === 'b')
return value == 'b' //true if equivalent and false if not
}
</script>
</head>
<body>
<!-- This is where we put the information to display to the user -->
<h1>
Barcode
</h1>
<h2 class="location">
Venue: UWI campus
</h2>
<button onClick="findText('c')">
Take me to your leader
</button>
<p id="sampleText">
My past girlfriend never returned my calls
</p>
<div id="sampleText">
My first div
</div>
</body>
</html>