-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
33 lines (32 loc) · 1.31 KB
/
index.html
File metadata and controls
33 lines (32 loc) · 1.31 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
<!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.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
</head>
<body>
<div class="dropdown">
<input type="text" class="textBox" placeholder="Dropdown Menu" readonly>
<div class="option">
<div onclick="show('HTML')" ><i class="fa-brands fa-html5"></i> HTML</div>
<div onclick="show('CSS')" ><i class="fa-brands fa-css3-alt"></i> CSS</div>
<div onclick="show('Javascript')" ><i class="fa-brands fa-js-square"></i> Javascript</div>
<div onclick="show('Bootstrap')" ><i class="fa-brands fa-bootstrap"></i> Bootstrap</div>
<div onclick="show('ReactJS')" ><i class="fa-brands fa-react"></i> ReactJS</div>
</div>
</div>
<script>
function show(anything){
document.querySelector('.textBox').value = anything;
}
let dropdown = document.querySelector('.dropdown');
dropdown.onclick = function(){
dropdown.classList.toggle('active');
}
</script>
</body>
</html>