Files
comp126/practices/24-10-24/index.html
2024-11-11 23:03:20 -05:00

62 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>In-Class 24-10-24</title>
<link rel="stylesheet" href="./css/index.css" />
</head>
<body>
<form>
<div>
<label for="name">Name</label>
<input id="name" name="name" type="text" />
</div>
<div>
<label for="uni">University</label>
<select id="uni" name="university">
<option>UNC</option>
<option>Duke</option>
<option>State</option>
</select>
</div>
<fieldset>
<div>
<input type="radio" id="email" name="contact" value="email" checked />
<label for="email">Email</label>
<input type="radio" id="phone" name="contact" value="phone" />
<label for="phone">Phone</label>
</div>
</fieldset>
<fieldset>
<div>
<input type="checkbox" id="cs" name="cs" checked />
<label for="cs">Computer Science</label>
</div>
<div>
<input type="checkbox" id="busi" name="busi" />
<label for="busi">Business</label>
</div>
</fieldset>
<div>
<label for="about">About</label>
<textarea id="about" name="about"></textarea>
</div>
<button>Submit</button>
</form>
</body>
<script>
addEventListener('submit', submit);
function submit(e) {
e.preventDefault();
console.log(e);
}
</script>
</html>