---
title: "关于Freemarker里面HashMap的使用"
author: "Chris_Lu"
date: "2009-08-12T17:36:55Z"
tags: []
slug: "freemarker-hashmap"
draft: false
lastmod: "2009-08-12T20:19:14Z"
id: 445791
url: "https://chris-lu.iteye.com/blog/445791"
---

&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;