")
document.writeln(" ")
document.writeln(" | ")
document.writeln(" ")
document.writeln(" 期數")
document.writeln(" ")
document.writeln(" | ")
document.writeln(" ")
document.writeln(" ")
document.writeln(" 本期應繳利息")
document.writeln(" ")
document.writeln(" | ")
document.writeln(" ")
document.writeln(" 本期應還本金")
document.writeln(" ")
document.writeln(" | ")
document.writeln(" ")
document.writeln(" ")
document.writeln(" 本息合計")
document.writeln(" ")
document.writeln(" | ")
document.writeln(" ")
document.writeln(" ")
document.writeln(" 攤還後餘額")
document.writeln(" ")
document.writeln(" | ")
document.writeln("
")
document.writeln("本試算表僅在利率不變下適用,計算結果為一近似值,僅供參考!");
for (i=1;i<=iterm;i++)
{
tempint = Math.round(tempbal*wsrate)
temprtrn= rtrnamtx - tempint
tempbal = tempbal - temprtrn
if ( tempbal < 0 )
{
temprtrn=temprtrn+tempbal
tempbal=0
rtrnamtx=temprtrn+tempint
}
if ( i%2 == 0 )
{
document.writeln("
| ")
document.writeln("" + i)
document.writeln(" | ")
document.writeln("" + tempint)
document.writeln(" | ")
document.writeln("" + temprtrn)
document.writeln(" | ")
document.writeln("" + rtrnamtx)
document.writeln(" | ")
document.writeln("" + tempbal)
document.writeln(" |
")
}
else
{
document.writeln("| ")
document.writeln("" + i)
document.writeln(" | ")
document.writeln("" + tempint)
document.writeln(" | ")
document.writeln("" + temprtrn)
document.writeln(" | ")
document.writeln("" + rtrnamtx)
document.writeln(" | ")
document.writeln("" + tempbal)
document.writeln(" |
")
}
}
document.writeln("
")
document.writeln("