这次给大家带来jQuery怎样获取标签子元素的值,jQuery获取标签子元素的值的注意事项有哪些,下面就是实战案例,一起来看一下。
一、在jsp页面中定义
科室:
二、编写js语句:
三、编写对应的请求语句:
ListdeptList=null; @RequestMapping(value = "/getDepts",method = {RequestMethod.GET}) public void getDepts(HttpServletResponse response) throws IOException { response.setCharacterEncoding("utf-8"); response.setContentType("text/json;charset=utf-8"); if (deptList == null){ deptList = deptService.findAllDepts(); }else { String res=JSON.toJSONString(deptList); response.getWriter().write(res); } }
四、实现效果如下:


相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!
推荐阅读:










