if(chk_system_n[i].checked ==true)
{
 temp=1;
}
改为
if(chk_system_n.options[i].selected==true)
{
 temp=1;
}

解决方案 »

  1.   

    TO: rainshow(要学习的那样多,时间却那么的少) 
    我按你的代码运行不过啊,出现异常了???
      

  2.   

    同意rainshow(要学习的那样多,时间却那么的少) (
      

  3.   

    我这边试过可以的
    我把我的草稿给你
    ------------------------------------------------------------------
    <script>
    function check()
    {
       
       
       var temp=0;
        
       var chk_system_n=document.getElementsByName('system_n');
       
        for(var i=0;i<chk_system_n.length;i++)
        {
          if(chk_system_n[i].selected ==true)
      {
      temp=1;
     
      }
        }
        if(temp==0)
        {
        alert("请选择系统信息!");
        return false;
        }
       
       
    return true;
    }
    </script>
    <select name="system_n" size=2 onblur='check()' multiple>
     <option value=1>1</option>
    <option value=2>2</option>
    </select>
    --------------------------------------------------------------
    你把上面那些代码拷下去试试看,如果不行,那就是环境不用造成的,我的环境是win2k/ie6
      

  4.   

    改成这样才对,忘记了
    <script>
    function check()
    {
       var temp=0;
        for(var i=0;i<document.all["system_n"].length;i++)
        {
          if(document.all["system_n"].options[i].selected ==true)
      {
      temp=1;
      }
        }
        if(temp==0)
        {
        alert("请选择系统信息!");
        return false;
        }
    return true;
    }
    </script>