-
Notifications
You must be signed in to change notification settings - Fork 0
/
results.html
39 lines (36 loc) · 877 Bytes
/
results.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
<!DOCTYPE html>
<html>
<head>
<title>Search Results</title>
<script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var query = new URL(window.location.href).searchParams.get('query');
$("#query").text(query);
if (query === 'happiness') {
$('#many-results').show();
} else {
$('#no-results').show();
}
});
</script>
<style>
.dynamic-content {
display: none;
}
</style>
</head>
<body>
<div align="middle">
<p>
Search for <strong><span id="query"></span></strong>
</p>
<p id="no-results" class="dynamic-content">
No results... :-(
</p>
<p id="many-results" class="dynamic-content">
Plenty of results! :-)
</p>
</div>
</body>
</html>