forked from liucec/covcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_function.html
35 lines (30 loc) · 1.2 KB
/
search_function.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
//THIS CONTAINS THE SEARCH FUNCTION ONLY, NOT YET INTEGRATED WITH WEBAPP
<!Doctype html>
<html>
<head>
<title>Search Bar</title>
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript">
function active(){
var searchBar = document.getElementById('searchBar');
if(searchBar.value == 'Search...'){
searchBar.value == ''
searchBar.placeholder = 'Search...'
}
}
function inactive(){
var searchBar = document.getElementById('searchBar');
if(searchBar.value == ''){
searchBar.value = 'Search...'
searchBar.placeholder = ''
}
}
</script>
</head>
<body>
<form action="search_function.php" method="post">
<input type="text" id="searchBar" placeholder="" value="Search..." maxlength="25" autocomplete="off" onMouseDown="active();" onBlur="inactive()" />
<input type="submit" name="submit" id="searchBtn" value="Go!" />
</form>
</body>
</html>