-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.html
32 lines (28 loc) · 853 Bytes
/
start.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>start</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<form action="https://duckduckgo.com/" method="get">
<input type="text" name="q" id="search">
</form>
</div>
<script>
const searchInput = document.getElementById('search');
searchInput.focus();
document.addEventListener('click', function() {
searchInput.focus();
});
window.addEventListener('beforeunload', function(event) {
if (search) {
search.value = '';
}
});
</script>
</body>
</html>