今天看啥
热点:

Freemarker遍历Java的Map,freemarkerjavamap


废话不说,看代码:

Java

Map<String, String> selectMap = new TreeMap<String, String>();
selectMap.put("platId", "平台ID");
selectMap.put("crawlerId", "爬虫ID");
request.setAttribute("selectMap", selectMap);
HTML

<select>
	<option value="all">所有字段</option>
	<#list selectMap?keys as key>
		<option value="${key}">${selectMap[key]}</option>
	</#list>
</select>	

效果:



www.bkjia.comtruehttp://www.bkjia.com/webzh/1002103.htmlTechArticleFreemarker遍历Java的Map,freemarkerjavamap 废话不说,看代码: Java MapString, String selectMap = new TreeMapString, String();selectMap.put(platId, 平台ID);selectMap....

相关文章

相关搜索: freemarker map

帮客评论

视觉看点