【发布时间】:2017-07-26 18:31:36
【问题描述】:
我收到最大调用堆栈错误,但不知道为什么。它说的是 jquery,我使用的只有 jquery 用于我的 ajax....
jquery.min.js:6 Uncaught RangeError: 超出最大调用堆栈大小
这是我的代码
function processPhase3(){
client_info.primary_email = _("emailAddress").value;
client_info.phone = _("cphone").value;
client_info.primary_text = _("cphone").value;
client_info.primary_voice = _("cphone").value;
client_info.hphone = _("cphone").value;
client_info.agree = _("agree");
// if check true
// then check if email or number in the text field
if(client_info.agree.checked == false){
_("alertThree").style.display = "block";
}else{
_("alertThree").style.display = "none";
}
if(client_info.phone.length > 3 || client_info.primary_email.length > 3){
_("alertFour").style.display = "none";
_("phase3").style.display = "none";
_("phase4").style.display = "block";
_("progressBar").classList.remove("progress-bar-success");
_("progressBar").className += ' progress-bar-success';
_("progressBar").style.width = '100%';
_("status").innerHTML = "Congratulations!";
$.ajax({
type: 'POST',
data: client_info,
url: "my_prefs_save.php"
});
}else{
_("alertFour").style.display = "block";
}
}
【问题讨论】:
-
client_info 在哪里实例化?你能告诉我们一个 console.log(client_info) 的样子吗?
-
您能否查看错误中提供的堆栈跟踪以了解问题的根源?
标签: javascript jquery