你这个N是啥是DIV???是DIV就不能这么写

解决方案 »

  1.   

    把document.getElementsByName(n).改为:document.all(n).
      

  2.   


    是<ul>里的一个<li>.是这么写的.
    <li style="CURSOR: pointer" id="13_2" name="aaa" class="btton49px listpic_nochecked">内容</li>
      

  3.   


    改成这样:document.all(n).style.background=strPic; 
    错误提示:找不到对象;
      

  4.   


    应该是中括号吧,用下面两个试试:document.getElementsByName[n].style.background=strPic;document.getElementsByName[n].style.backgroundColor="#E0E0E0";
      

  5.   

    很有可能是ie的bug造成的,document.getElementsByName只能在 表单对象和img标签内查找,div不再他的查找范围.