html使用ajax请求后台是报错

https://img4.mukewang.com/5b9a1a710001c81a11070016.jpg

ajax请求方式为:

<script type="text/javascript">var BASE_PATH = '[[${#httpServletRequest.getContextPath()}]]';</script>

function PdfFint(){    console.log(BASE_PATH);  console.log(BASE_PATH+"manage/pdf/exportpdf");

   $.ajax({            url:BASE_PATH+'/manage/pdf/exportpdf',            data:{"PlayerId":1,"TeamPlayer":1},            type:'post',            success:function(data){
                layerMessage("PDF文档生成成功");
            }
   });
}

请大神解答,应如何解决,并如如何实现请求后台,谢谢!


慕雪6442864
浏览 1028回答 1
1回答

qq_笑_17

BASE_PATH 获取是你服务端的地址,你浏览器怎么可以访问呢。大哥
打开App,查看更多内容
随时随地看视频慕课网APP