一、在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); } }
四、实现效果如下:
jQuery如何实现套选项卡功能 jQuery实现套选项卡功能代码示例
jquery插件实现图片悬浮代码示例
jquery如何实现抽奖功能 jquery实现抽奖功能代码示例
jQuery如何实现计算器功能 jQuery实现计算器功能代码示例
jQuery zTree改变指定节点文本样式代码示例
Jquery使用each函数实现遍历及数组处理代码实例