How do I take this HTML code and display the input data below the submit button where the person div tag is using DOM in JavaScript??? I want it to display as 'Hello, (firstname)(lastname)! You are (age) old.'
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>replit</title>
<link href="style.css" rel="stylesheet" type="text/css"/>
<script src="script.js"></script>
</head>
<body>
<div class="container">
<form action="index.html" method="post" id="signup">
<h1>Input Your Information</h1>
<div class ="info">
<div class="field">
<label for="firstname"></label>
<input type="text" id="text" name="firstname" placeholder="First Name"/>
</div>
<div class="field">
<label for="lastname"></label>
<input type="text" id="text" name="lastname" placeholder="Last Name"/>
</div>
<div class="field">
<label for="age"></label>
<input type="text" id="text" name="age" placeholder="Age"/>
</div>
<div class="field">
<button type="submit" onclick=display() class="button">Submit</button>
</div>
</div>
<div id="person"></div>
</form>
</div>