先放效果图,如下: 需要引入jquery ,bootstrap jq代码如下: function pCalculator(amount,term,rating,repayway){ var zhonghe = parseInt(amount),sum = 0,lixi,benjin,obj = {}; //等额本息 if(repayway == 1){ //每月还款 sum = amount * rating/12 * Math.pow((1 + rating/12), term) / ( Ma