spring boot 复选框

  • Post author:
  • Post category:其他


jsp代码

技能:  <form:checkboxes path="jineng" items="${jinengItme}" />

spring代码 数据代码

    private List<String> jineng(){
        List<String>list = new ArrayList<>();
        list.add("HTML");
        list.add("CSS");
        list.add("JS");
        list.add("JQ");
        list.add("JAVA");
        list.add("SQL");
        list.add("JSTL");
        list.add("Tomcat");

        return list;
    }

模型代码

model.addAttribute("jinengItme",jineng());

转载于:https://www.cnblogs.com/max-hou/p/11244705.html