<SCRIPT language=JavaScript type=text/javascript>
var idstr="";
var fNameStr="";
function isLength()
{
try
{
var filenames=document.kk.filename;
var ids=document.kk.fID;
var tst=ids.length;
return true;
}
catch(e)
{
return false;
}
}
function Page_Submit()
{
if(isLength())
getSelIDFileName();
else
{
if(document.kk.fID.checked)
idstr=document.kk.fID.value;
fNameStr=document.kk.filename.value;
}
if(idstr=="")
{
alert('删除前请先选择要删除的内容');
return false;
}
if(confirm('删除后将不能恢复!您确定要删除吗?'))
{
self.location='filedel.asp?id='+idstr+'&filename='+fNameStr;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name == 'fID')
{
e.checked = form.chkall.checked;
}
}
}
function getSelIDFileName()
{
var filenames=document.kk.filename;
var ids=document.kk.fID;
for(var i=0;i<ids.length;i++)
{
if(ids[i].checked)
{
idstr+=ids[i].value+"|";
fNameStr+=filenames[i].value+"|";
}
}
}
</script>
把javascript代码改成这样再试。