-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
100 lines (48 loc) · 2.03 KB
/
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
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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="1170">
<meta charset="utf-8">
<title>TEST</title>
<link rel="stylesheet" href="css/styles.css">
<meta name="format-detection" content="telephone=no">
<meta name="description" content="">
<meta name="kewords" content="">
<link rel="shortcut icon" href="logo_vkladka.gif">
</head>
<body>
<header>
<div class="head_contaier">
<img class="header_container-logo" src="img/os2.svg" height="75px" alt="Logo">
<div class="header_input">
<input type="text" placeholder=" Поиск" class="header_search">
<img src="search_icon.png" class="input_icon">
</div>
<nav>
<ul class="nav_menu">
<li id="d666"><a href="#">Сотрудничество</a></li>
<li id="d666"><a href="#">Магазины</a></li>
<li id="d666"><a href="#">Помощь</a></li>
<li id="d666"><a href="#">Регистрация</a></li>
</ul>
</nav>
</div>
</header>
<script>
var icon = document.querySelector(".input_icon");
var input = document.querySelector(".header_search");
input.addEventListener("focus",insideRemover);
function insideRemover() {
icon.style.display = "none";
input.placeholder = "";
window.addEventListener("mousedown",function(event) {
if (event.target.className != "header_search" && input.value == "") {
input.placeholder = " Поиск";
icon.style.display = "block";
}
})
}
</script>
</body>
</html>