input 的 id 设为参数

_id="shul"_ type="text" class="item_quantity" value="1" /> type="button" class="item_add items" onclick="insert_shopcar('${goodID}','$price}')" value="加入购物车"/>
我要把第一个input的 id值设置为shul后面加上${goodID} 应该怎么写

直接放id属性里面,你参数知道放,id不是一样搞起就行了

 <input id="shul${goodID}" type="text" class="item_quantity" value="1" /> 
<input type="button" class="item_add items" onclick="insert_shopcar('${goodID}','$price}')" value="加入购物车"/>

建议JS动态添加html代码。http://www.jb51.net/article/56113.htm