主题:为什么会出现这样的情况?
<%@page contentType="text/html;charset=gb2312"
language="java" import="java.util.*"
%>
<%
String jiage = request.getParameter("jiage");
int j = Integer.parseInt(jiage);
String pingfang = request.getParameter("pingfang");
int p = Integer.parseInt(pingfang);
String cheng = request.getParameter("cheng");
double c = Integer.parseInt(cheng);
String nian = request.getParameter("nian");
int year =Integer.parseInt(nian);
double z = 0;
if(year ==1 && j!=0 && p!=0){
for(c=0.1;c<=1;c++){
z=(j * p * c)+(j * p * c)*0.0441;
}
}
else if(year == 2 && j!=0 && p!=0){
for(c=0.1;c<=1;c++){
z=(j * p * c)+(j * p * c)*0.0441;
}
}
else {
out.println("输入有误!");
}
%>
<html>
<head>
<title></title>
</head>
<body>
<h1 align=center>您要查询的数据如下: <br>
还款总额:<%=z%><br>
贷款总额:<%=j * p * c%><br>
月均还款:<%=(z/year)/12%><br>
</body>
</html>
//这个提示说有异常 大家帮我看看
<%@page contentType="text/html;charset=gb2312"
language="java" import="java.util.*"
%>
<html>
<head><title></title>
</head>
<body>
<form method=post action="FangDai1.jsp">
<h1 align=center><font color=red>房贷计算器</font><br><br>
请输入您要买房的单价(元/平方米):<input type=text size=2 name="jiagext"/><br>
请输入您要买房的面积(平方米):<input type=text size=4 name="pingfang"><br>
按揭成数:
<select name="cheng">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select><br>
按揭年数:
<select name="nian">
<option value="1">3到5年</option>
<option value="2">5到30年</option>
</select><br>
<input type=submit value=提交>
<input type=reset value=重置>
</form>
</form>
</body>
</html>
这个是我前面的
language="java" import="java.util.*"
%>
<%
String jiage = request.getParameter("jiage");
int j = Integer.parseInt(jiage);
String pingfang = request.getParameter("pingfang");
int p = Integer.parseInt(pingfang);
String cheng = request.getParameter("cheng");
double c = Integer.parseInt(cheng);
String nian = request.getParameter("nian");
int year =Integer.parseInt(nian);
double z = 0;
if(year ==1 && j!=0 && p!=0){
for(c=0.1;c<=1;c++){
z=(j * p * c)+(j * p * c)*0.0441;
}
}
else if(year == 2 && j!=0 && p!=0){
for(c=0.1;c<=1;c++){
z=(j * p * c)+(j * p * c)*0.0441;
}
}
else {
out.println("输入有误!");
}
%>
<html>
<head>
<title></title>
</head>
<body>
<h1 align=center>您要查询的数据如下: <br>
还款总额:<%=z%><br>
贷款总额:<%=j * p * c%><br>
月均还款:<%=(z/year)/12%><br>
</body>
</html>
//这个提示说有异常 大家帮我看看
<%@page contentType="text/html;charset=gb2312"
language="java" import="java.util.*"
%>
<html>
<head><title></title>
</head>
<body>
<form method=post action="FangDai1.jsp">
<h1 align=center><font color=red>房贷计算器</font><br><br>
请输入您要买房的单价(元/平方米):<input type=text size=2 name="jiagext"/><br>
请输入您要买房的面积(平方米):<input type=text size=4 name="pingfang"><br>
按揭成数:
<select name="cheng">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select><br>
按揭年数:
<select name="nian">
<option value="1">3到5年</option>
<option value="2">5到30年</option>
</select><br>
<input type=submit value=提交>
<input type=reset value=重置>
</form>
</form>
</body>
</html>
这个是我前面的