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>
作者:dybai
出自:https://0xcafebabe.cnblogs.com
赞赏:3Ky9q5HVGpYseBPAUTvbJBvM3h3FQ3edqr(BTC)
本作品采用知识共享署名-相同方式共享 3.0 中国大陆许可协议进行许可。
欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。
posted on 2011-05-16 23:37 0xCAFEBABE 阅读(211) 评论(0) 收藏 举报
浙公网安备 33010602011771号