jj05.asp
来自「房地产管理系统 vb写的,很不错!!!!!!!!!!!」· ASP 代码 · 共 192 行
ASP
192 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<TITLE><%=homepage_title%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../inc/style.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<FORM name=myform>
<br>
<TABLE width=473 height=320
border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR vAlign=top>
<TD align=middle height=194> <TABLE cellSpacing=0 cellPadding=0 width=400 border=0>
<TBODY>
<TR></TR>
<TR></TR>
</TBODY>
</TABLE>
<TABLE class=ch-9 cellSpacing=1 cellPadding=0
width="100%" bgColor=#76AE00 border=0>
<TBODY>
<TR>
<TD height=20 align=middle bgColor=#76AE00 class="p13"> <font color="#FFFFFF">提前还贷计算器</font>
<SCRIPT language=javascript>
function play(){
if (document.myform.dkze.value=='')
{
alert('请填入贷款总额');
return false;
}
else
sm=parseFloat(document.myform.dkze.value)*10000;
if(document.myform.hklx[1].checked)
{
if(document.myform.hklxje.value=='')
{
alert('请填入部分提前还款额度');
return false;
}
}
stime=parseInt(document.myform.ydkqx.options[document.myform.ydkqx.selectedIndex].value);
if(document.myform.dklx[0].checked && stime<=60) srate=0.003;
if(document.myform.dklx[0].checked && stime>60) srate=0.003375;
if(document.myform.dklx[1].checked && stime<=60) srate=0.003975;
if(document.myform.dklx[1].checked && stime>60) srate=0.0042;
md=(parseInt(document.myform.yjtqhksjn.options[document.myform.yjtqhksjn.selectedIndex].value)-parseInt(document.myform.dychksjn.options[document.myform.dychksjn.selectedIndex].value))*12 + (parseInt(document.myform.yjtqhksjy.options[document.myform.yjtqhksjy.selectedIndex].value)-parseInt(document.myform.dychksjy.options[document.myform.dychksjy.selectedIndex].value));
if(md<0 || md>stime)
{
alert('预计提前还款时间与第一次还款时间有矛盾,请查实');
return false;
}
yhk=sm*(srate*Math.pow((1+srate),stime))/(Math.pow((1+srate),stime)-1);
lrq=(parseInt(document.myform.dychksjn.options[document.myform.dychksjn.selectedIndex].value)+Math.floor((stime+parseInt(document.myform.dychksjy.options[document.myform.dychksjy.selectedIndex].value)-2)/12))+'年'+((stime+parseInt(document.myform.dychksjy.options[document.myform.dychksjy.selectedIndex].value)-2) % 12+1)+'月';
pol=yhk*md;
rsd=0;
uir=0;
for(i=1;i<=md;i++){
rsd=rsd+(sm-uir)*srate;
uir=uir+yhk-(sm-uir)*srate;
}
remark='';
if(document.myform.hklx[1].checked){
ert=document.myform.hklxje.value*10000;
if(ert+yhk>=yhk*(1/srate-1/(srate*Math.pow((1+srate),(stime-md))))){
remark='您的提前还款额已经可以一次还清所有未还款项!';
}else{
if(document.myform.clfs[0].checked){
wer=0;
qwa=0;
for(j=sm-uir-yhk-ert;j>=0;j=j-qwa){
qwa=yhk/Math.pow((1+srate),wer);
wer++;
}
vbr=(sm-uir-yhk-ert)*(srate*Math.pow((1+srate),wer))/(Math.pow((1+srate),wer)-1);
bnf=yhk+ert;
thx=yhk*stime-pol-bnf-vbr*wer;
bncc=(parseInt(document.myform.dychksjn.options[document.myform.dychksjn.selectedIndex].value)+Math.floor((wer+md+parseInt(document.myform.dychksjy.options[document.myform.dychksjy.selectedIndex].value)-2)/12))+'年'+((wer+md+parseInt(document.myform.dychksjy.options[document.myform.dychksjy.selectedIndex].value)-2) % 12+1)+'月';
}else{
vbr=(sm-uir-yhk-ert)*(srate*Math.pow((1+srate),(stime-md)))/(Math.pow((1+srate),(stime-md))-1);
bnf=yhk+ert;
thx=yhk*stime-pol-bnf-vbr*(stime-md);
bncc=lrq;
}
}
}
if(document.myform.hklx[0].checked || remark!=''){
bnf=(sm-uir)*(1+srate);
vbr=0;
thx=yhk*stime-pol-bnf;
bncc=document.myform.yjtqhksjn.options[document.myform.yjtqhksjn.selectedIndex].value+'年'+document.myform.yjtqhksjy.options[document.myform.yjtqhksjy.selectedIndex].value+'月';
}
document.myform.ykhke.value=chgnum(yhk);
document.myform.yzhhkq.value=lrq;
document.myform.yhkze.value=chgnum(pol);
document.myform.yhlxe.value=chgnum(rsd);
document.myform.gyyihke.value=chgnum(bnf);
document.myform.xyqyhke.value=chgnum(vbr);
document.myform.jslxzc.value=chgnum(thx);
document.myform.xdzhhkq.value=bncc;
document.myform.jsjgts.value=remark;
}
function chgnum(sum){
return Math.round(sum*100)/100;
}
</SCRIPT> </TD>
</TR>
<TR>
<TD height=30 bgColor=#ffffff class="p13"> 贷款总额:
<INPUT size=10
name=dkze>
万元
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?