loanstatus.asp

来自「javascript source code part2」· ASP 代码 · 共 44 行

ASP
44
字号
<%@ LANGUAGE="JavaScript" %>

<%
var Payments

if (Session("Loan").GetLoanData(Request.Form("LoanNumber")) == 0) {
   Response.Redirect("error.asp?code=LoanNumber")
}

if (parseInt(Request.Form("PaymentNumber")) >
      parseInt(Session("Loan").NPayments)) {
   Response.Redirect("error.asp?code=PaymentNumber")
}

Session("Loan").LoanStatus(Request.Form("PaymentNumber"))

%>

<HTML>
<BODY>


<H3> This is your loan status</H3>

Loan value: <%= Session("Loan").PV %><BR>
Interest rate per year: <%= Math.round(Session("Loan").Rate * 12 * 100) %>%<BR>
Monthly Payment: <%= Session("Loan").PaymentAmount %><BR>
Number of payments: <%= Session("Loan").NPayments %>
<P>

Last payment number: <%= Request.Form("PaymentNumber") %> <BR>
Paid Interest: <%= Session("Loan").PaidInterest %> <BR>
Returned Capital: <%= Session("Loan").ReturnedCapital %> <BR>
Remaining Capital: <%= Session("Loan").RemainingCapital %> <BR>
<P>

<FORM>
<INPUT TYPE="button" VALUE="Back" onClick="javascript:history.back()">
<INPUT TYPE="button" VALUE="Loan Manager" onClick="document.location='default.htm'">
</FORM>

</BODY>
</HTML>

⌨️ 快捷键说明

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