-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (37 loc) · 1.3 KB
/
Copy pathindex.html
File metadata and controls
42 lines (37 loc) · 1.3 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Daily Challenge — HTML Form</title>
<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<main class="wrap">
<header>
<h1>📝 Daily Challenge: HTML Form</h1>
<p class="muted">Collect two fields and append the JSON string to the page (no reload).</p>
</header>
<!-- Form: name, last name, submit -->
<section class="card">
<form id="userForm" novalidate>
<label for="name">Name</label>
<input id="name" name="name" type="text" placeholder="Ada" />
<label for="lastname">Last name</label>
<input id="lastname" name="lastname" type="text" placeholder="Lovelace" />
<div class="actions">
<button type="submit" class="btn">Send</button>
<button type="button" id="clear" class="btn secondary">Clear Output</button>
</div>
</form>
</section>
<!-- Output: each submission appends one JSON string -->
<section class="card">
<h2>📤 Output</h2>
<ol id="log" class="log" aria-live="polite" aria-label="Submission log"></ol>
</section>
</main>
<!-- IMPORTANT: load your JS file -->
<script src="js/app.js"></script>
</body>
</html>