```html
body {
fontfamily: Arial, sansserif;
margin: 0;
padding: 0;
backgroundcolor: f4f4f4;
color: 333;
}
.container {
maxwidth: 800px;
margin: 20px auto;
padding: 20px;
backgroundcolor: fff;
borderradius: 5px;
boxshadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1, h2 {
textalign: center;
}
form {
margintop: 20px;
textalign: center;
}
input[type="text"], input[type="number"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: 1px solid ccc;
borderradius: 5px;
boxsizing: borderbox;
}
input[type="submit"] {
backgroundcolor: 007bff;
color: fff;
border: none;
padding: 10px 20px;
cursor: pointer;
borderradius: 5px;
transition: backgroundcolor 0.3s ease;
}
input[type="submit"]:hover {
backgroundcolor: 0056b3;
}
document.getElementById('financeForm').addEventListener('submit', function(event) {
event.preventDefault();
var initialInvestment = parseFloat(document.getElementById('initialInvestment').value);
var monthlyDeposit = parseFloat(document.getElementById('monthlyDeposit').value);
var investmentYears = parseFloat(document.getElementById('investmentYears').value);
var totalInvestment = initialInvestment (monthlyDeposit * 12 * investmentYears);
var totalReturns = totalInvestment * 1.08; // 假设年化收益率为8%
document.getElementById('totalReturns').textContent = '总投资金额加利润:' totalReturns.toFixed(2) '元';
document.getElementById('result').style.display = 'block';
});