<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<p>贷款一万,还贷利润为10%</p>
<p> 请输入贷款年限:<input type="text" id='year' /></p>
<p> 还贷金额:<span id='money'></span></p>
<script>
const input = document.getElementById('year')
const div = document.getElementById('money');
input.oninput = () => {
div.innerHTML = Math.pow(11, input.value) * 10000 / Math.pow(10, input.value) + '元';
}
</script>
</body>