-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_page.html
More file actions
53 lines (49 loc) · 1.68 KB
/
Copy pathsimple_page.html
File metadata and controls
53 lines (49 loc) · 1.68 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Page</title>
<style>
.hover-button {
padding: 10px 15px;
background-color: #007BFF;
color: white;
border: none;
cursor: pointer;
transition: background-color 0.3s;
}
.hover-button:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h1>Simple Page</h1>
<h2>Select an option:</h2>
<select id="simpleSelect" onchange="displaySelection()">
<option value="">--Select an option--</option>
<option value="Option 1">Option 1</option>
<option value="Option 2">Option 2</option>
<option value="Option 3">Option 3</option>
</select>
<p id="selectionText"></p>
<h2>Input your text:</h2>
<input type="text" id="textInput" oninput="displayInput()" placeholder="Type something...">
<p id="inputText"></p>
<h2>Hoverable Button:</h2>
<button class="hover-button" onclick="alert('Button Clicked!')">Hover over me!</button>
<script>
function displaySelection() {
const select = document.getElementById('simpleSelect');
const selectionText = document.getElementById('selectionText');
selectionText.textContent = 'You selected: ' + select.value;
}
function displayInput() {
const input = document.getElementById('textInput');
const inputText = document.getElementById('inputText');
inputText.textContent = 'You entered: ' + input.value;
}
</script>
</body>
</html>