计算器异步刷新问题已解决

master
istars 7 years ago
parent 1e05244780
commit d15625f2f1

@ -11,7 +11,7 @@ public interface userMapper {
public User selectUserByuserNum(long userNum);
@Select("select * from user where userName = #{userName}")
public User selectUserByuserName(String userName);
public User selectUserByuserName(String userName);
@Select("select * from user where telephoneNum = #{telephoneNum}")
public User selectUserBytelephoneNum(String telephoneNum);

@ -79,7 +79,7 @@ public class SumCirController {
String json = JSONObject.toJSONString(map);
//System.out.println(json);
response.getWriter().print(json);
return;
//return json;
}finally {
}
@ -89,7 +89,7 @@ public class SumCirController {
String json = JSONObject.toJSONString(map);
//System.out.println(json);
response.getWriter().print(json);
return;
//return json;
}
double sum_principal_and_intrate = 0;
@ -114,14 +114,15 @@ public class SumCirController {
String json = JSONObject.toJSONString(map);
//System.out.println(json);
response.getWriter().print(json);
return;
//return json;
}
//System.out.println(sum_principal_and_intrate);
map.put("value",sum_principal_and_intrate);
String json = JSONObject.toJSONString(map);
//System.out.println(json);
response.getWriter().print(sum_principal_and_intrate);
return;
System.out.println(json);
response.getWriter().print(json);
}
}

@ -19,6 +19,8 @@
// var equ = decument.getElementsByName("equation");
// var equation = equ.value();
// if(amount=""){
// alert("金额不能为空");
// return;
@ -40,8 +42,10 @@
data:$("#form2").serialize(),
async: false,
success: function (data) {
var str = "<span class=\"aui-center-title\">计算应还款总金额为:"+data+"元</span>";
var str = "<span class=\"aui-center-title\">应还款总金额为:"+data.value+"元</span>";
$("#sum").append(str);
//console.log(data);
//alert("结果为:" + data.value);
},
@ -55,7 +59,9 @@
</head>
<body>
<section class="aui-flexView">
<header class="aui-navBar aui-navBar-fixed b-line">
@ -123,7 +129,7 @@
</a>
</div>
<div class="tab-button">
<button onclick="btnNotForm()">开始计算</button>
<button onclick="btnNotForm()" type="button">开始计算</button>
<!--<input type="button" value="开始计算" onclick="btnNotForm()">-->
</div>
</div>

Loading…
Cancel
Save