var productId=$V("productId");
<c:forEach var="p" items="${customerProducts}">
if(${p.id}== productId){}
上面是js中的代码,productId是我定义的变量在循环中想判断是否相等咋办????急。。求高人