Jquery没有将数组输出到HTML中-JquerynotoutputtinganarrayintoHTML
作者:乐檬 | 来源:互联网 | 2023-05-18 16:18
AlrightsoIamtryingtooutputsimpleJSONarrayinajaxbutnomatterwhatIdotheHTMLwontapp
Alright so I am trying to output simple JSON array in ajax but no matter what I do the HTML wont appear on the page at all...
好吧所以我试图在ajax中输出简单的JSON数组,但无论我做什么,HTML都不会出现在页面上......
$("#menu_zalbe").click(function() {
$.ajax({
url:"assets/core/handlers/reportHandler.php",
type:"POST",
data:{function:"getAll"},
dataType:"json",
success:function(data) {
for(var i = 0; i
'");
}
},
error:function(data) {
console.log(data);
}
});
});
I did console.log to check if there is an error or if it passing wrong data but everything is absolutely correct, there doesnt seem to be any problems but the HTML wont pop up on the page itself
我做了console.log以检查是否有错误或者是否传递了错误数据但是一切都是绝对正确的,似乎没有任何问题但HTML不会弹出页面本身
2 个解决方案