Customer
Customer
DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customer Information Form</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
label {
display: block;
margin-bottom: 8px;
}
input {
width: 100%;
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
padding: 10px 15px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<button type="submit">Submit</button>
</form>
<script>
document.getElementById('customerForm').addEventListener('submit',
function(event) {
event.preventDefault();
const customerName = document.getElementById('customerName').value;
const contactNumber = document.getElementById('contactNumber').value;
console.log('Customer Name:', customerName);
console.log('Contact Number:', contactNumber);
// Here you can add code to handle form submission, e.g., send data to
a server
});
</script>
</body>
</html>