<input type="select" name="im">
<% String name = "";
File d = new File(dir_path);//dir_path是图片文件夹的位置
if (d.exists())
{
File list[]=d.listFiles();
for (int i = 0; i < list.length; i++)
{
if (list[i].isFile())
{
name = list[i].getName()
%>
<option value = <%=name%>><%=name%></option>
<%
}
}
} %></select>
下面的应该会了吧