⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calc_7.asp

📁 十分好的音乐网站源码 十分好的音乐网站源码十分好的音乐网站源码十分好的音乐网站源码十分好的音乐网站源码
💻 ASP
字号:
<HTML><HEAD><TITLE>贷款计算</TITLE>
<SCRIPT language=JavaScript>
function isAllDigit(str) {
 var ch, index;
 for(index = 0; index<str.length; index++) {
 ch = str.charAt(index);
 if (!(ch >= '0' && ch <= '9')) {
 return false;
 }
 }
 return true;
}

function GetSelectedOpt(mySel){
	for (i = 0; i < mySel.options.length; i++){
		if (mySel.options[i].selected){
			return mySel.options[i].value;
		}
	}
}

function ReturnTax(myFrm){
	var mIncome, mTax, nMonths, n, wIncome, rate, deduction, price, resault;
	if (myFrm.mSalary.value == "" ){
		alert ("请输入您的月收入!");
		myFrm.mSalary.focus();
		return "";
	}
	if (! isAllDigit(myFrm.mSalary.value)){
		alert ("请输入正确的数据!");
		myFrm.mSalary.focus();
		return "";
	}
	if (myFrm.mSalary.value < 0 || myFrm.mSalary.value > 10000000){
		alert ("请输入正确的月收入!");
		myFrm.mSalary.focus();
		return "";
	}
	if (myFrm.HousePrice.value == ""){
		alert ("请输入您所买的房子的总价!");
		myFrm.HousePrice.focus();
		return "";
	}
	if (! isAllDigit(myFrm.HousePrice.value)){
		alert ("请输入正确的数据!");
		myFrm.HousePrice.focus();
		return "";
	}
	if (myFrm.HousePrice.value < 0 || myFrm.HousePrice.value > 10000){
		alert ("请输入正确的房价!");
		myFrm.HousePrice.focus();
		return "";
	}
	n = (2003 - parseInt(GetSelectedOpt(myFrm.BuyYear))) * 12 + (6 - parseInt(GetSelectedOpt(myFrm.BuyMonth)));
	if (n <= 0) {
		alert ("请选择正确的买房日期!");
		myFrm.BuyYear.focus();
		return "";
	}
	mIncome = parseFloat(myFrm.mSalary.value);
	price = parseFloat(myFrm.HousePrice.value) * 10000.00;
	
	wIncome = mIncome - 1000.00;
	
	if (wIncome * n >= price){
		wIncome = price / n;
	}
	
	if (wIncome <= 500){
		rate = 0.05;
		deduction = 0;
	}
	else {
		if (wIncome <= 2000){
			rate = 0.10;
			deduction = 25;
		}
		else {
			if (wIncome <= 5000){
				rate = 0.15;
				deduction = 125;
			}
			else {
				if (wIncome <= 20000){
					rate = 0.20;
					deduction = 375;
				}
				else {
					if (wIncome <= 40000){
						rate = 0.25;
						deduction = 1375;
					}
					else {
						if (wIncome <= 60000){
							rate = 0.30;
							deduction = 3375;
						}
						else {
							if (wIncome <= 80000){
								rate = 0.35;
								deduction = 6375;
							}
							else {
								if (wIncome <= 100000){
									rate = 0.40;
									deduction = 10375;
								}
								else {
									rate = 0.45;
									deduction = 15375;
								}
							}
						}
					}
				}
			}
		}
	}
	mTax = (mIncome - 1000.00) * rate - deduction;
	resault = n * (wIncome * rate - deduction);

	if (resault >= 0){
		return parseInt(resault);
	}
	else {
		return 0;
	}
}
function OnMyReset(frm)
{
	frm.reset();	
}
function myCale(myFrm)
{
	document.Caculator.BackTax.value=ReturnTax(myFrm);
}
 </SCRIPT>

<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<LINK 
href="../images/realty.css" rel=stylesheet type=text/css>
<META content="Microsoft FrontPage 5.0" name=GENERATOR></HEAD>
<BODY leftMargin=0 topMargin=0>
<SCRIPT language=javascript>
  function openwin0(id) { window.open("old2buy_info.asp?Infoid="+id,"","height=523,width=510,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");} 
  function openwin1(id) { window.open("old2_info.asp?Infoid="+id,"","height=523,width=510,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");} 
  function openwin2(id) { window.open("lease_info.asp?Infoid="+id,"","height=523,width=510,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");}
  function openwin3(id) { window.open("lease_info2.asp?Infoid="+id,"","height=523,width=510,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");}  
  function openwin4(id) { window.open("lease_info3.asp?Infoid="+id,"","height=523,width=510,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");}
  function openwin5(id) { window.open("zone_info.asp?Infoid="+id,"","height=523,width=590,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");} 
  function opennewh(id) { window.open("newh_info.asp?infoid="+id,"","height=523,width=550,left=70,top=0,resizable=no,scrollbars,status=no,toolbar=no,menubar=no,location=no");}
  function openme1() { window.open("sq_error.asp","","height=320,width=584,left=70,top=0,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");}
</SCRIPT>
<LINK href="../images/realty.css" 
rel=stylesheet type=text/css>
<TABLE width="500" border=0 align="center" cellPadding=2 cellSpacing=1 bgColor=#99CC00>
  <FORM action="" method=post name=Caculator onsubmit="return false;">
    <TBODY>
      <TR> 
        <TD align=middle class=title colSpan=2 height=22><FONT 
            color=#ffffff>购房退税计算器</FONT></TD>
      </TR>
      <TR> 
        <TD bgColor=#edf4c1 class=title height=20>请输入数据:</TD>
        <TD bgColor=#edf4c1 class=title>计算结果:</TD>
      </TR>
      <TR> 
        <TD bgColor=#edf4c1 height=26>月 收 入: 
          <INPUT name=mSalary size=14>
          元 </TD>
        <TD align=middle bgColor=#edf4c1 rowSpan=4>退税总额: 
          <INPUT name=BackTax 
            readOnly size=10>
          元</TD>
      </TR>
      <TR> 
        <TD bgColor=#edf4c1 height=26>买房总额: 
          <INPUT name=HousePrice size=14>
          万元</TD>
      </TR>
      <TR> 
        <TD bgColor=#edf4c1 height=26>买房日期: 
          <SELECT name=BuyYear>
            <OPTION 
              selected value=2000>2000</OPTION>
            <OPTION value=2001>2001</OPTION>
            <OPTION value=2002>2002</OPTION>
            <OPTION 
            value=2003>2003</OPTION>
          </SELECT>
          <SELECT name=BuyMonth>
            <OPTION 
              selected value=1>1</OPTION>
            <OPTION value=2>2</OPTION>
            <OPTION 
              value=3>3</OPTION>
            <OPTION value=4>4</OPTION>
            <OPTION 
              value=5>5</OPTION>
            <OPTION value=6>6</OPTION>
            <OPTION 
              value=7>7</OPTION>
            <OPTION value=8>8</OPTION>
            <OPTION 
              value=9>9</OPTION>
            <OPTION value=10>10</OPTION>
            <OPTION 
              value=11>11</OPTION>
            <OPTION value=12>12</OPTION>
          </SELECT>
          月</TD>
      </TR>
      <TR> 
        <TD align=middle bgColor=#edf4c1 height=32><INPUT class=unnamed1 name=Submit onclick=javascript:myCale(document.Caculator) type=submit value=计算> 
          &nbsp;&nbsp; <INPUT class=unnamed1 name=Submit2 onclick=OnMyReset(document.Caculator) type=submit value=重置> 
        </TD>
      </TR>
      <TR> 
        <TD colSpan=2 height=8></TD>
      </TR>
  </FORM>
</TABLE>
</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -