有点难度的表单验证

来源:百度知道 编辑:UC知道 时间:2024/09/25 09:28:42
<html>
<table>
<c:forEach items="${priceList}" var="msg">
<tr>
<td><input type="checkbox" name="id"></td>
<td><input type="text" name="price" value="${priceList.price}"></td>
<td><input type="text" name="productName" value="${priceList.productName}"></td>
</tr>
<c:forEach>
</table>
</html>

我用有是JSP语言
当用户单击"提交“按钮时,验证表单,如果用户未选中任何一个复选框(id),则提示用户至少选中一个,如果用户选中了一个复选框,则对选中该行的productName,infoProduct,price进行验证,使之不能为空,用Javascript程序验证

这个有难度?
不过你的这个页面要改改!
否则怎么判断啊!不加太麻烦!
hi上聊聊吧!
用jquery会简单些!

...${priceList.price}和${priceList.productName}
是对的吗?

没有难度啊