---
title: "关于Freemarker里面HashMap的使用"
author: "houzi"
date: "2009-05-27T16:25:30Z"
tags: []
slug: "freemarker-hashmap"
draft: false
lastmod: "2009-05-27T16:25:30Z"
id: 397391
url: "https://code-chris.iteye.com/blog/397391"
---

&lt; #list testMap?keys as testKey&gt;  
       &lt; option value =" ${testKey} " &gt;

              ${ testMap.get(testKey ) }

     &lt;/ option&gt;  
&lt; / #list&gt;

或者使用：

&lt; #list testMap.keySet() as testKey&gt;  
       &lt; option value =" ${testKey} " &gt;  
        ${ testMap.get(testKey) }

     &lt;/ option&gt;  
&lt; / #list&gt;