首页 新闻 会员 周边 捐助

控制台显示 calculate1 not define

0
[待解决问题]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Login</title>
<!--<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">-->
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<!--<meta name="keywords" content="Flat Dark Web Login Form Responsive Templates, Iphone Widget Template, Smartphone login forms,Login form, Widget Template, Responsive Templates, a Ipad 404 Templates, Flat Responsive Templates" />-->
<link href="css/style.css" rel='stylesheet' type='text/css' />
<!--webfonts-->
<link href='http://fonts.useso.com/css?family=PT+Sans:400,700,400italic,700italic|Oswald:400,300,700' rel='stylesheet' type='text/html'>
<link href='http://fonts.useso.com/css?family=Exo+2' rel='stylesheet' type='text/html'>
<!--//webfonts-->
<script src="js/jquery-1.9.1.min.js"></script>
<script type="Javascript">
function calculate1() {

$.ajax(
{
type: 'post',
data: {

mainScore: $("#mainScore").val(),
studentAddScore: $("#studentAddScore").val(),
cultureBuild: $("#cultureBuild").val(),
reduceScore: $("#reduceScore").val(),
},
url: "calculate.do",
success: function (finalScore) {

alert(finalScore);
}

}
);
}

</script>
</head>
<body>


<!--SIGN UP-->
<h1>五星文明专用计算器</h1>
<div class="login-form">
<div class="close"></div>
<div class="head-info">
<label class="lbl-1"> </label>
<label class="lbl-2"> </label>
<label class="lbl-3"> </label>
</div>
<div class="clear"></div>
<div class="avtar">
<img src="images/avtar.png"/>
</div>
<!--<form action="/Calculate.do" method="post">-->
<input type="text" class="text" id="mainScore" name="mainScore" placeholder="基本分">
<div class="key">
<input type="text" id="studentAddScore" name="studentAddScore" placeholder="楼栋学生加分">
</div>
<div class="key">
<input type="text" id="cultureBuild" name="cultureBuild" placeholder="楼栋文化建设">
</div>
<div class="key">
<input type="text" id="reduceScore" name="reduceScore" placeholder="减分项目">
</div>
<button onclick="calculate1()">计算</button>

</div>
</body>
</html>
戴林甫的主页 戴林甫 | 菜鸟二级 | 园豆:204
提问于:2017-03-26 19:07
< >
分享
所有回答(1)
0
$(function(){
    function calculatel(){
   } 
})

包住试试

liuxb1991 | 园豆:661 (小虾三级) | 2017-03-27 08:26
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册