?? currexchangebean.jsp
字號:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:useBean id="calc" class="sas.calc" scope="session" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Money Banks公司 現金轉換</title>
</head>
<body bgproperties="fixed" bgcolor="#CCCCFF">
<form action="Home_page.htm">
<table border="0" width="100%" height="42">
<tr>
<td width="50%" height="24">
<b><font size="5" ><i>Money Banks 公司</i></font></b>
</td>
<td width="50%" height="36"></td>
</tr>
</table>
<p align="center"><b><font size="4" >現金轉換</font></b></p>
<p ><font >將 </font>
<% request.setCharacterEncoding("utf-8"); %>
<%= request.getParameter("frmCurr")%>
<% String frCrr[]={"美元", "英鎊", "加元", "歐元", "澳元"};
String crr=request.getParameter("frmCurr");
int ctr=0;
while(!(crr.equals(frCrr[ctr])))
{
ctr++;
if( ctr >= 5 )
break;
}
%>
<jsp:setProperty name="calc" property="fromCurr" value="<%= ctr%>"/>
<font >轉換成</font> <%= (String)request.getParameter("toCurrency") %>
<% String toCrr[]={"美元", "英鎊", "加元", "歐元", "澳元"};
String tocrr=request.getParameter("toCurrency");
int ctr1=0;
while(!(tocrr.equals(toCrr[ctr1])))
ctr1++;
%>
<jsp:setProperty name="calc" property="toCurr" value="<%= ctr1%>"/>
<p ><font >金額: </font>
<%= (String)request.getParameter("amount") %>
<%
int amnt=0;
String str1;
str1=request.getParameter("amount");
str1=str1.trim();
amnt=Integer.parseInt(str1,10);
%>
<jsp:setProperty name="calc" property="amt" value="<%= amnt%>"/>
<p ><font >結果: </font>
<%
double res=calc.calculate();
out.println(res);
%>
<p align="center">
<input type="submit" value="確認" name="OK">
</p>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -