P210阶段3(个人所得税计算器)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>210页阶段三</title>
</head>

<body>
<script type="text/javascript">
	function Calc(){
		document.formA.txtIncomeTax.value = (parseFloat(document.formA.txtEarning.value) - parseFloat(document.formA.txtStartMoney.value)) * 0.1;
	}
</script>
<form name = "formA" method = "post" action = "">
	<table border = "1">
		<tr>
			<td colspan = "2"><center>个人所得税计算器</center></td>
		</tr>
		<tr>
			<td>请输入你的月收入:</td>
			<td><input type="text" name="txtEarning" /> 元</td>
		</tr>
		<tr>
			<td>请输入所得税起征额:</td>
			<td><input name="txtStartMoney" /> 元</td>
		</tr>
		<tr>
			<td>所得税:</td>
			<td><input name="txtIncomeTax" type="text" /> 元</td>
		</tr>
		<tr>
			<td colspan="2"><center><input name="btnCalc" type="button" value="计算" onclick="Calc()" />  <input name="btnAnew" type="reset" value="重填" /></center></td>
		</tr>
	</table>
</form>
</body>
</html>

posted on 2011-05-16 23:37  0xCAFEBABE  阅读(203)  评论(0编辑  收藏  举报

导航