Skip to content

Commit

Permalink
email example
Browse files Browse the repository at this point in the history
jkhkh
  • Loading branch information
hwlong0305 committed Feb 14, 2024
1 parent 848940a commit 613068c
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions emailAddress.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title>Fancy Form Exercise</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

</head>
<body>
<script>
createAddress() {

let first= document.getElementByID(firstName);
let initial = first.charAt(0);
let last= document.getElementByID(lastName);
let emailAddress = initial + "." + last + "@waketech.edu";

document.alert(emailAddress)


}

</script>

<div name="form-box">
<form action="fancy-form-action.html" method="get">
<label for="firstName" class="labels">First Name:</label>
<input type="text" name="firstName" class="fields" id="firstName" /> <br />

<label for="lastName" class="labels">Last Name:</label>
<input type="text" name="lastName" class="fields" id="lastName" /> <br />

<label for="email" class="labels">Email:</label>
<input type="email" name="email" class="fields" /> <br />

<label for="favorite_color" class="labels">Favorite Color:</label>
<input type="color" name="colorPicker" value="#50364A" class="fields" /> <br />

<button type="button" onclick="createAddress()">Get Email Address</button>

</form>
</div>
</body>
</html>

0 comments on commit 613068c

Please sign in to comment.