一步步调试,先从展现层看看${userId}有没有值?
再有你是放在<s:iterator value="list">迭代器你去做的展现,而你的拼接是拿url跳转传值window.location.href= "del.action?user.userId="+str;
你在打印一下alert(str)你看看提交前有没有值,按理来说checkbox是多选框,所以以前不用struts时候都是这么取值String abc[] = request.getParameterValues("abc");而你的传值是window.location.href= "del.action?user.userId="+str;这么传递的,嗯,你想怎么封装这个值?后台有个userbean,然后有个userId属性??你先一步步调试吧,把代码多复制上来看看
再有你是放在<s:iterator value="list">迭代器你去做的展现,而你的拼接是拿url跳转传值window.location.href= "del.action?user.userId="+str;
你在打印一下alert(str)你看看提交前有没有值,按理来说checkbox是多选框,所以以前不用struts时候都是这么取值String abc[] = request.getParameterValues("abc");而你的传值是window.location.href= "del.action?user.userId="+str;这么传递的,嗯,你想怎么封装这个值?后台有个userbean,然后有个userId属性??你先一步步调试吧,把代码多复制上来看看
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货