-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathStartup.html
More file actions
76 lines (63 loc) · 1.42 KB
/
Startup.html
File metadata and controls
76 lines (63 loc) · 1.42 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>React Startup Code</title>
<style>
* {
box-sizing: border-box;
}
body {
background: gray;
}
.search {
background: white;
position: relative;
width: 300px;
font-family:Verdana;
border-radius:16px;
}
.search input {
width: 100%;
padding: 20px 60px 20px 20px;
display: block;
font-size: 16px;
border-radius:16px;
}
.search button {
background: transparent;
border: none;
cursor: pointer;
display: inline-block;
font-size: 20px;
position: absolute;
top: 0;
right: 0;
padding: 4px 8px;
z-index: 2;
}
.search input:focus {
color #802;
}
</style>
</head>
<body>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<form action="Startup.html" method="get">
<div class="form-group search">
<input type="text" class="input" placeholder="search" name="ort">
<button type="submit"><img src='magnify.svg'></button>
</div>
</form>
<div id="content">
</div>
<script type="text/babel">
// React since react V4 does not read query parameters so we read query parameter directly
const urlParams = new URLSearchParams(window.location.search);
const ort = urlParams.get('ort');
if(ort!=null) alert(ort);
</script>
</body>
</html>