-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinfo.html
More file actions
76 lines (74 loc) · 1.82 KB
/
Copy pathinfo.html
File metadata and controls
76 lines (74 loc) · 1.82 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>For more info...</title>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names..">
<table id="myTable">
<tr class="header">
<th style="width:60%;">Name</th>
<th style="width:40%;">Information Just Search it up!</th>
</tr>
<tr>
<td>birthplace</td>
<td>Boston</td>
</tr>
<tr>
<td>favorite food</td>
<td>ramen or padthai</td>
</tr>
<tr>
<td>favorite subject</td>
<td>Math</td>
</tr>
<tr>
<td>2nd language</td>
<td>English I speak Korean</td>
<tr>
<td>Age</td>
<td>I am 14 years old!</td>
<tr>
<td>Birthdate</td>
<td>March 3rd 2004</td>
<tr>
<td>Hobbies</td>
<td>Eating or Sleeping</td>
<tr>
<td>What I like to do</td>
<td>Search up memes</td>
<tr>
<td>Favorite Musician</td>
<td>The Beatles and Queen</td>
<tr>
<td>Politician I like</td>
<td>Obama</td>
</tr>
</table>
<body>
<a href="index.html">Home</a>
<a href="portfolio.html">About Me</a>
<a href="hobbys.html">My Hobbies</a>
<a href="accomplishment.html">My Accomplishments</a>
<a href="Yourface.html">Portfolio!</a>
</body>
<script>
function myFunction() {
// Declare variables
var input, filter, table, tr, td, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("myTable");
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[0];
if (td) {
if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>