Biodata Maker
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f5f5f5;
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 300px;
text-align: center;
}
h1 {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
}
input, textarea {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 15px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.output {
margin-top: 20px;
text-align: left;
}
document.getElementById('biodataForm').addEventListener('submit', function(event) {
event.preventDefault();
const name = document.getElementById('name').value;
const dob = document.getElementById('dob').value;
const email = document.getElementById('email').value;
const phone = document.getElementById('phone').value;
const address = document.getElementById('address').value;
const biodataOutput = `
Biodata
Name: ${name}
Date of Birth: ${dob}
Email: ${email}
Phone: ${phone}
Address: ${address}
`;
document.getElementById('biodataOutput').innerHTML = biodataOutput;
});