function chk(){
a=document.all.item("名称")
if(a==null)
{
alert("什么也不是")
return
}
if(a.length==null) alert("是对象不是数组")
else
alert("数组")
}
a=document.all.item("名称")
if(a==null)
{
alert("什么也不是")
return
}
if(a.length==null) alert("是对象不是数组")
else
alert("数组")
}
来做,NS6+和IE5+都支持,而且不用判断是否是数组或对象