<!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>工资计算器</title>
<script type="text/javascript">
var data=[
{level:1,start:0,end:500,rate:5,jian:0},
{level:2,start:501,end:2000,rate:10,jian:25},
{level:3,start:2001,end:5000,rate:15,jian:125},
{level:4,start:5001,end:20000,rate:20,jian:375},
{level:5,start:20001,end:40000,rate:25,jian:1375},
{level:6,start:40001,end:60000,rate:30,jian:3375},
{level:7,start:60001,end:80000,rate:35,jian:6375},
{level:8,start:80001,end:100000,rate:40,jian:10375},
{level:9,start:100000,end:0,rate:45,jian:15375}
];
function conpute(){
var idStart= parseInt(document.getElementById("idStart").value);
var idValue= parseInt(document.getElementById("idValue").value);
var idSheBao= parseInt(document.getElementById("idSheBao").value);
var idStep="";
var idStepCompute="";
var idShuiHou = idValue-idStart-idSheBao;
var tempResult=0;
for(var i=0;i<data.length;i++)
{
 if(idShuiHou>=data[i].start&&(idShuiHou<=data[i].end || data[i].end==0))
 {
 tempResult=idShuiHou*(data[i].rate/100)-data[i].jian;
 idStepCompute=idShuiHou+"*"+(data[i].rate/100)+"-"+data[i].jian;
 break;
 }
}
idStepCompute = idStepCompute.length<1||idStepCompute==undefined?("0"):(idStepCompute);
document.getElementById("idStep").innerHTML=idValue+"-("+idStepCompute+")-"+idSheBao+"="+(idValue-tempResult-idSheBao);
tempResult=(idValue-tempResult-idSheBao);
document.getElementById("idDaoShou").value=tempResult;
}
function doCancel(){
document.getElementById("idValue").value=2000;
}
</script>
<style type="text/css">
<!--
.STYLE1 {
 font-size: 18px;
 font-weight: bold;
}
table td{
border:   #FFFFCC 1px solid;
  text-align:left;
}
table{
border: #FFFFCC 1px solid;
}
-->
</style>
</head>

<body>
<center>
<table width="600" height="220"  border="1"  cellspacing="0">
  <tr>
    <td height="59" colspan="3"><div align="center" class="STYLE1">工资计算器</div></td>
  </tr>
  <tr>
    <td width="127" height="42">工资起征点:</td>
    <td width="331"><input >15,375</td>
  </tr>
</table>
</center>
</body>
</html>

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2021-11-30
  • 2022-12-23
  • 2021-09-02
猜你喜欢
  • 2022-03-07
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案