jquery向后台取值的问题
我用的是spring mvc 我后台编码是
@Controller
public class BasysController {
@Autowired
private UserssDAO userDAO;
@RequestMapping( "/basy/getJson ")
public ModelAndView getJson(HttpServletResponse response,HttpServletRequest request) throws
IOException{
request.setCharacterEncoding( "UTF-8 ");
response.setCharacterEncoding( "UTF-8 ");
response.setContentType( "application/json ");
//提取数据
ReadFrData rfd = new ReadFrData();
List <String> l = rfd.getDataFromMysql();
//把集合转化为JSON格式的数组
String data = JsonUtil.listToJson(l);
System.out.println(data);
PrintWriter out = response.getWriter();
out.print(data);
return new ModelAndView( "manager/Autocomplete ");
}
}
请问下前台页面用JQUERY 怎么提取data 的值...
------解决方案--------------------
java的我就不清楚了,mvc应该有重写后这个方法的url地址什么的吧。。可以通过浏览器直接访问的
------解决方案--------------------
url 你这样写“../manager/Autocomplete.jsp”