-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbanglore.html
101 lines (98 loc) · 3 KB
/
banglore.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hospital</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for hospital..">
<ul id="myUL">
<li class="myDIV"><a href="#">Nanavati Super Speciality Hospital</a></li>
<div class="hide">
<ul>
<li>General beds: 0</li>
<li>Oxygen beds: 38</li>
<li>ICU beds without ventilator: 0</li>
<li>ICU beds with ventilator: 0</li>
</ul>
</div>
<li class="myDIV"><a href="#">S L Raheja Fortis Hospital</a></li>
<div class="hide">
<ul>
<li>General beds: 0</li>
<li>Oxygen beds: 35</li>
<li>ICU beds with ventilator: 7</li>
<li>ICU beds without ventilator: 0</li>
</ul>
</div>
<li class="myDIV"><a href="#">Jaslok Hospital</a></li>
<div class="hide">
<ul>
<li>General beds: 0</li>
<li>Oxygen beds: 15</li>
<li>ICU beds without ventilator: 2</li>
<li>ICU beds with ventilator: 8</li>
</ul>
</div>
<li class="myDIV"><a href="#">Fortis Hospital</a></li>
<div class="hide">
<ul>
<li>General beds: 5</li>
<li>Oxygen beds: 11</li>
<li>ICU beds without ventilator: 11</li>
<li>ICU beds with ventilator: 4</li>
</ul>
</div>
<li class="myDIV"><a href="#">Saifee Hospital</a></li>
<div class="hide">
<ul>
<li>General beds: 23</li>
<li>Oxygen beds: 23</li>
<li>ICU beds without ventilator: 7</li>
<li>ICU beds with ventilator: 7</li>
</ul>
</div>
<li class="myDIV"><a href="#">Lilavati Hospital And Research Centre</a></li>
<div class="hide">
<ul>
<li>General beds: 9</li>
<li>Oxygen beds: 12</li>
<li>ICU beds without ventilator: 6</li>
<li>ICU beds with ventilator: 1</li>
</ul>
</div>
<li class="myDIV"><a href="#">Bombay Hospital & Medical Research Centre</a></li>
<div class="hide">
<ul>
<li>General beds: 0</li>
<li>Oxygen beds: 4</li>
<li>ICU beds without vetilator: 5</li>
<li>ICU beds with ventilator: 5</li>
</ul>
</div>
</ul>
<script>
function myFunction() {
// Declare variables
var input, filter, ul, li, a, i, txtValue;
input = document.getElementById('myInput');
filter = input.value.toUpperCase();
ul = document.getElementById("myUL");
li = ul.getElementsByTagName('li');
// Loop through all list items, and hide those who don't match the search query
for (i = 0; i < li.length; i++) {
a = li[i].getElementsByTagName("a")[0];
txtValue = a.textContent || a.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
li[i].style.display = "";
} else {
li[i].style.display = "none";
}
}
}
</script>
</body>
</html>