运行结果如下:
html代码如下:
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>资产负债表</title>
<script src="js/zichan.js"></script>
<style>
input{
background-color: lightblue;/*设置表单的颜色统一*/
border:3px solid lightblue;/*设置表单的边框与背景融为一体*/
}
</style>
</head>
<body style="background-color: lightblue" align="center">
<table align="center" border="1" cellspacing="0" >
<tr>
<td colspan="10" align="center" width="1000px" height="30px" bgcolor="#6495ed"> <b>资产负债表 先生/女士家庭 日期</b></td>
</tr>
<tr>
<td rowspan="20" bgcolor="#006400"> 金融资产</td>
<td rowspan="7" bgcolor="#008b8b"width="200px"> 现金与现金</td>
<th bgcolor="#1e90ff" > 现金</th>
<th bgcolor="#1e90ff"width="80px"> 金额</th>
<th bgcolor="#1e90ff" width="100px"> 备注</th>
</tr>
<tr>
<td>活期存款</td>
<td> <input type="text" id="1-01" onchange="fun('1-01'),output('g1')"></td>
<td ><input type="text"></td>
</tr>
<tr>
<td>定期存款</td>
<td> <input type="text" id="1-02" onchange="fun('1-02'),output('g1')"></td>
<td><input type="text"></td>
</tr>
<tr>
<td>其他类型银行存款</td>
<td> <input type="text" id="1-03" onchange="fun('1-03'),output('g1')"></td>
<td><input type="text"></td>
</tr>
<tr>
<td>货币市场基金</td>
<td> <input type="text" id="1-04" onchange="fun('1-04'),output('g1')"></td>
<td><input type="text"></td>
</tr>
<tr>
<td>人寿保险金收入</td>
<td> <input type="text" id="1-05" onchange="fun('1-05'),output('g1')&