-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
24 lines (23 loc) · 909 Bytes
/
index.html
File metadata and controls
24 lines (23 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<head>
<title>HTML5 Email Input</title>
</head>
<body>
<form id="emailForm" action="http://www.example.org/subscribe.php" onsubmit="submitForm()">
<p>Please enter your email address:</p>
<input type="email" id="emailInput" name="email" required>
<input type="submit" value="Submit">
</form>
<script>
function submitForm() {
var userEmail = document.getElementById("emailInput").value;
var greetingMessage = document.createElement("div");
greetingMessage.textContent = "Thank you for subscribing with email: " + userEmail;
greetingMessage.style.fontSize = "100px";
greetingMessage.style.fontWeight = "bold";
document.body.innerHTML = "";
document.body.appendChild(greetingMessage);
return false;
}
</script>
</body>
</html>