<script language="javascript">
function SelectDel() //删除
{
var strid='';
var cs=document.all.item("cb");
for(var i=0;i<cs.length;i++)
{
if(cs(i).checked)
{
strid+=strid==''?'':','
strid+=cs(i).id+'';
}
}
var uu="delall.asp?id="+strid;
f2.action=uu;
f2.submit();
} </script>
然后用了个分页显示
response.write "<td><input type=""checkbox"" name=""cb"" id="&res.fields(0).value&" value="&res.fields(0).value&"></td>"
存储过程是
create proc emp_del
@empid varchar(10)
as
begin
delete dbo.career where [id]=(select [id] from emp where empid =@empid)
end
go
这样只能一条记录一条记录的删除,没有实现功能"全选删除".[id]是int
传值的时候是“id=T123,T456”,但存的时候必须存入为"T123","T456"
多谢回复人员...........
[此贴子已经被作者于2007-3-21 9:21:55编辑过]