<script type="text/javascript">
$(document).ready(function(){
$("#J_index_btn").bind('click',function(){
var name = $('#name').val();
var phone = $('#phone').val();
var identification = $('#identification').val();
var height = $('#height').val();
var weight = $('#weight').val();
var age = $('#age').val();
var foodcontent = $('#foodcontent').val();
$.ajax({
url: '/SigninfoAction/register',
type: "post",
data:{
'name':name,
'phone':phone,
'identification':identification,
'weight':weight,
'height':height,
'age':age,
'foodcontent':foodcontent,
},
dataType:'json',
error:function(){
alert(msg);
alert("服务器忙,请稍候再试");
},
success:function(data){
if(data.error==0){
alert('报名成功 ! 我们会马上联系您并帮您安装!');
window.location.reload();
}else{
alert('报名失败 ! 请重试!');
}
}
});
});
});
</script>
这段ajax表单提交 始终都是跳到error function() 点提交就跳出“服务器忙,请稍后重试” ,就是没进到提交的那段 ,也不太清楚url该怎么写才是对的...求大神指教...
ä¸é¢æ¯å段代ç
MessageAction.class.php页é¢ä»£ç å¦ä¸ï¼
<?php