/*** 氣球貨計算器
* author:luozihua
* data:2011-8-29 13:57:22 房貸計算器
*/// 註冊命名空間calculator.calculate
namespace.register("calculator.houseloan");
//在calculator.gea命名空間裡面宣告類person
calculator.houseloan.person = function(name, age)
//給類person新增乙個公共方法loancalc()
calculator.houseloan.person.prototype.loancalc = function() }}
//等額本息
calculator.houseloan.person.prototype.loancalc1 = function()
else
html1 = html1 + "" + i + "
" + corpuspay + "
" + cinterest + "
" + cloan
+ "" + s + "
"; interest = parsefloat(parsefloat(interest) + parsefloat(cinterest))
.tofixed(2);
} var totalpay = cloan * (parseint(t) - 1);
// 第t期
cinterest = parsefloat((s * i * 100) / 100).tofixed(2); // 本期應還利息, 小數點保留2位
corpuspay = s; // 本期還款本金,四捨五入,小數點保留2位
cloan = (parsefloat(corpuspay) + parsefloat(cinterest)).tofixed(2); // 本期還款額
s = 0.00; // 本期還款後剩餘本金,四捨五入,小數點保留2位
if (i % 2 == 0) else
html1 = html1 + "" + parseint(t)
+ "" + corpuspay + "
" + cinterest + "
" + cloan + "
" + s + "
"; html = html + html1 + "";
$("#loanplandetail").html(html);
totalpay = (parsefloat(totalpay) + parsefloat(cloan)).tofixed(2);
interest = parsefloat(parsefloat(interest) + parsefloat(cinterest))
.tofixed(2);
$("#totalpay").val(totalpay);
$("#totalinterest").val(interest);
if (parseint($("#floatrateflag").val()) != 0) else
$("#interestlabel").css("display", "none");
$("#interestdata").css("display", "none");
$("#interest").html("");
}//給類person新增乙個公共方法loancalc2() 等額本金
calculator.houseloan.person.prototype.loancalc2 = function()
else
html1 = html1 + "" + i + "
" + corpuspay + "
" + cinterest + "
" + cloan
+ "" + s + "
"; interest = parsefloat(parsefloat(interest) + parsefloat(cinterest))
.tofixed(2);
} totalpay = cloan * (parseint(t) - 1);
// 第t期
cinterest = parsefloat((s * i * 100) / 100).tofixed(2); // 本期應還利息, 小數點保留2位
corpuspay = s; // 本期還款本金,四捨五入,小數點保留2位
cloan = (parsefloat(corpuspay) + parsefloat(cinterest)).tofixed(2); // 本期還款額
s = 0.00; // 本期還款後剩餘本金,四捨五入,小數點保留2位
if (i % 2 == 0) else
html1 = html1 + "" + parseint(t)
+ "" + corpuspay + "
" + cinterest + "
" + cloan + "
" + s + "
"; html = html + html1 + "";
$("#loanplandetail").html(html);
totalpay = (parsefloat(totalpay) + parsefloat(cloan)).tofixed(2);
interest = parsefloat(parsefloat(interest) + parsefloat(cinterest))
.tofixed(2);
$("#totalpay").val(totalpay);
$("#totalinterest").val(interest);
if (parseint($("#floatrateflag").val()) != 0) else
$("#interestlabel").css("display", "none");
$("#interestdata").css("display", "none");
$("#interest").html("");
}//控制浮動
calculator.houseloan.person.prototype.selectchange = function(id)
else
}//驗證浮動比率
calculator.houseloan.person.prototype.getrate = function()
else
return parsefloat($("#txtfloatrate").val()) * isshow; }}
calculator.houseloan.person.prototype.validatecheck = function()
if ($("#loanyear").val() == "" || !$("#loanyear").val())
if ($("#loanrate").val() == "" || !$("#loanrate").val())
if ($("#forecastloanyear").val() == "" || !$("#forecastloanyear").val()) else
if (parsefloat($("#forecastloanyear").val()) > 360)
} return true;
}
實現計算器
dim boldot as boolean dim dblacc1,dblacc2 as double dim dblacc3 as double 10 dim strop as string private sub add num byval intnumber as integer if bol...
計算器修改
在做計算器介面修改這個專案中遇見的問題。先把需求說清楚,黑莓風格的計算器裡面有觸控和非觸控兩個流程。介面,功能,和座標是不一樣的。我是要在非觸控下做出觸控螢幕的介面,除了不能觸控以外,所有的功能都要和觸控螢幕下一樣。之前先是找到資源,然後替換資源,載入,調座標,調功能,調bug。資源很快就找到了,然...
簡單計算器
unit unit1 inte ce uses windows,messages,sysutils,variants,classes,graphics,controls,forms,dialogs,stdctrls,buttons,math math是數 算單元 type tform1 class ...