<tr> <td>Product name</td> <td><select name="product.id" id="ss"> <option value="">请选择</option> <c:forEach items="${list}" var="product"> alert(${product.id}) <option value="${product.id}">${product.proName}</option> </c:forEach> </select></td> </tr>Note: select submits the value in option by default, so if you don't choose, it will submit "please select", and add value="" to option and this will solve it
select submit form
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=325846201&siteId=291194637
Recommended
Ranking