jQuery中使用ajax发送请求,报错
Cannot read properties of undefined (reading 'ajax'); Cannot read property 'ajax' of undefined
错误代码
$.ajax({type:"POST",url:"pageServlet",data:jsonData,dataType:"json",success:function (data) {alert(data);}})
解决办法:将$改成jQuery
jQuery.ajax({type:"POST",url:"pageServlet",data:jsonData,dataType:"json",success:function (data) {alert(data);}})