日期:2014-05-17  浏览次数:20945 次

一个没有 结果的帖子 希望 wangwm(星星火炬-http://jymass.com) 继续帮忙
接着问我这个帖子阿
http://community.csdn.net/Expert/topic/5502/5502758.xml?temp=.6256983

------解决方案--------------------
<script>
function del_cyc()
{
var sForm = document.xoYuStudioH;
var num = 0;
if(typeof(sForm.BM_id.length)== "undefined ")
{
if (sForm.BM_id.checked==false)
{
alert( '请选择您要删除的纪录! ');
return false;
}
else
{
document.xoYuStudioH.action= "DepartmentDel.asp ";
document.xoYuStudioH.submit();
return true;
}
}
else
{
for(var i=0;i <=sForm.BM_id.length-1;i++)
{
(sForm.BM_id(i).checked)?num+=1: ' '
}
if(num== '0 ')
{
alert( '请选择您要删除的纪录! ');
return false;
}
if(confirm( '确定删除此部门吗!? '))
{
document.xoYuStudioH.action= "DepartmentDel.asp ";
document.xoYuStudioH.submit();
return true;
}
}
}
</script>
<form name= "xoYuStudioH ">
<input type= "checkbox " name= "BM_id " value= "123 " />
<input onClick= "javascript:del_cyc(); " name= "xoYuStudioDo4 " value= "删除部门 " type= "button " title= "删除选定记录 " />
</form>