这个方法在ie下可以不过在firefox下不行。
function queryRecord(s)
{
      var maxnum=s.value;
      var   j=0;   
      var playlist=document.getElementById("playlist");
      var   el   =playlist.elements;   
      var   count   =   el.length;
      for   (i=0;i<count;i++)   
      {   
  if   (el[i].type=="checkbox"   &&   el[i].checked==true)   
  j++;   
  if   (el[i].type=="radio"   &&   el[i].checked==true)   
  j++; 
      } 
      if(j==0){alert("请选择选项!");
      return false;
      }else if (0<j<=maxnum){
    document.all.playlist.submit();
    return true;
    }else{
        return false;
}
}