-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform_elements.html
120 lines (110 loc) · 2.73 KB
/
form_elements.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<!DOCTYPE html>
<html>
<head>
<style>
ul.navbar {
list-style-type: none;
margin: 0;
padding: 0;
background-color: #f1f1f1;
overflow: hidden;
}
ul.navbar li {
float: left;
}
ul.navbar li a {
display: block;
color: #333;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
ul.navbar li a:hover {
background-color: #ddd;
}
.container {
text-align: center;
margin-top: 50px;
}
input[type="text"] {
padding: 10px;
font-size: 16px;
}
button {
padding: 10px 20px;
font-size: 16px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
/* #result {
margin-top: 20px;
font-size: 18px;
} */
.button2 {
position: fixed;
bottom: 20px;
left: 20px;
background-color: blue;
color: white;
padding: 10px 20px;
font-size: 16px;
border: none;
cursor: pointer;
}
</style>
<title>Form elements</title>
</head>
<body>
<h2>Element</h2>
<ul class="navbar">
<li><a href="index.html">Home</a></li>
<li><a href="not-present-in-dom.html">Not Present in DOM</a></li>
<li><a href="not-present-in-ui.html">Not Present in UI</a></li>
<li><a href="unstable-element.html">Unstable Element</a></li>
<li><a href="disabled-element.html">Disabled Element</a></li>
<li><a href="event-receiving-element.html">Event Receiving Element</a></li>
<li><a href="xhrrequest.html">XHR Element</a></li>
<li><a href="form_elements.html">Form Element</a></li>
<li><a href="all_elements.html">All elements</a></li>
</ul>
<br>
<div class="container">
<input type="text" id="name">
<button onclick="displayInput()">Submit</button>
<div id="result"></div>
<button class="button2" onclick="showAlert()">Click me!</button>
<h1>hello <button>gg</button></h1>
</div>
</div>
<h3>hello</h3>
<div class="inn">
<select name="cars" id="bikes">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<select name="cars" id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
</div>
<script>
function displayInput() {
var input = document.getElementById("name").value;
var result = document.getElementById("result");
result.innerHTML = input;
}
function showAlert() {
alert("Button clicked!");
}
</script>
</body>
</html>