jsp页面中:
购买的产品:<input type='checkbox' name='Products' value='a'>
<input type='checkbox' name='Products' value='b'>
<input type='checkbox' name='Products' value='c'>
<input type='checkbox' name='Products' value='d'>
control中:
String[] Product = request.getParameterValues("Products");
StringBuffer g = new StringBuffer();
for(int i=0;i< Product.length;i++){//字符串拼接时使用
g.append(Product[i]+" ");
}
String Products = g.toString();
最后
以上就是傻傻大山最近收集整理的关于jsp复选框的取值问题的全部内容,更多相关jsp复选框内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复