1.得到数组 在jsp中定义一个name为A的文本域等
var A = document.getElementsByName("A");
然后对他进行遍历就得到想要的值
2.对select的处理
<c:set var="originList" value="电话,邮件,传真,论坛,手机"/>
<select name="ORIGIN" id="ORIGIN">
<c:forEach items="${fn:split(originList, ',')}" var="item" varStatus="vs">
<c:choose>
<c:when test="${fn:contains(ntComplaint.ORIGIN,item)}"><option value="${item}" selected="selected">${item}</option></c:when>
<c:otherwise><option value="${item}">${item}</option></c:otherwise>
</c:choose>
</c:forEach>
</select>
必须加入fn标签:<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>