ajax url地址

当前网址

http://localhost:8080/exam_paper/402881ec5c3924ec015c394ee4210000/set_questions

ajax请求url

var url = "exam_questions/json?type=" + type ;

请求之后的网址

http://localhost:8080/exam_paper/402881ec5c3924ec015c394ee4210000/exam_questions/json?type=2

正确的请求网址是

 http://localhost:8080/exam_questions/json?type=2

正确的ajax请求url

var url = "../../exam_questions/json?type=" + type ;

原文地址:https://www.cnblogs.com/linsx/p/6941091.html