checkbox区域:
<div align="center">
<input type="checkbox" name="appid" value= <%=appinfo.getContentId()%>>
</div>
删除:
<input type="button" name="delete" value="Delete" onClick="doDel()">doDel:function doDel()
{
var len = document.frmSoftware.appid.length;
if(len)
{
for(var i =0;i<len;i++)
{
if(document.frmSoftware.appid[i].checked == true)
{
if(confirm("Are you sure to delete ?"))
{
document.frmSoftware.action = "promodel.jsp";
document.frmSoftware.submit();
}
return;
}
}
alert("Please select one or more items!");
return ;
}else
{
if(document.frmSoftware.appid.checked == true)
{
if(confirm("Are you sure to delete ?"))
{
document.frmSoftware.action = "promodel.jsp";
document.frmSoftware.submit();
}
return;
}else
{
alert("Please select the item!");
return ;
}
}
}promodel.jsp取值:String[] appid = request.getParameterValues("appid");对项目的编辑是一样的只要你能传递唯一标志的值就可以了!
<div align="center">
<input type="checkbox" name="appid" value= <%=appinfo.getContentId()%>>
</div>
删除:
<input type="button" name="delete" value="Delete" onClick="doDel()">doDel:function doDel()
{
var len = document.frmSoftware.appid.length;
if(len)
{
for(var i =0;i<len;i++)
{
if(document.frmSoftware.appid[i].checked == true)
{
if(confirm("Are you sure to delete ?"))
{
document.frmSoftware.action = "promodel.jsp";
document.frmSoftware.submit();
}
return;
}
}
alert("Please select one or more items!");
return ;
}else
{
if(document.frmSoftware.appid.checked == true)
{
if(confirm("Are you sure to delete ?"))
{
document.frmSoftware.action = "promodel.jsp";
document.frmSoftware.submit();
}
return;
}else
{
alert("Please select the item!");
return ;
}
}
}promodel.jsp取值:String[] appid = request.getParameterValues("appid");对项目的编辑是一样的只要你能传递唯一标志的值就可以了!
《jsp web编程指南》就不错。
大哥,没办法阿,下星期说要交软件了,想钻钻空子,如果交不上来工作就可能泡汤了,试用期的日子真不好过!!