<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>javascript学习</title>
<style>
.output {
font-weight: bold;
}
#payment {
text-decoration: underline;
}
#graph {
border: solid black 1px;
}
th,td {
vertical-align: top;
}
</style>
</head>
<body>
<table>
<tr>
<th>Enter Loan Data:</th>
<td></td>
<th>Loan Balance,Cumulative Equity,and Interest Payments</th>
</tr>
<tr>
<td>Amount of the loan ($):</td>
<td>
<input id = "amount" onchange="calculate();">
</td>
<td rowspan=8>
<canvas id="graph" width="400" height="250">
</canvas>
</td>
</tr>
<tr>
<td>
Annual interest (%):
</td>
<td>
<input id="apr" onchange="calculate();">
</td>
</tr>
<tr>
<td>
Repayment period (years):
</td>
<td>
<input id="years" onchange="calculate();">
</td>
</tr>
<tr>
<td>
Zipcode (to find lenders):
</td>
<td>
<input id="zipcode" onchange="calculate();">
</td>
</tr>
<tr>
<td>
Approximat