function picview(id1,divnum){
var picword="images/pic"+id1+".jpg"
         var color="000000";
this.pictime=window.setTimeout(function(){
      document.all.pic1.style.width='200';
                                           document.all.pic1.style.height='200';
       document.all.pic1.src=picword;},800);

    this.firetime=window.setInterval(function(){ 
document.getElementById('"span'+divnum+id1+'"').style.filter="glow(color="+color+",strength=4)"},200);}
settimeout能正常运行,setinterval提示说是缺少对象?错在哪里?如果id1=49,divnum=3,则span349是存在的.

解决方案 »

  1.   

    document.getElementById('"span'+divnum+id1+'"')"span'+divnum+id1+'"  这句有问题,取不到 ID值
      

  2.   

    document.getElementById('span+"+divnum+id1+"')
    用这个试试  
      

  3.   

    明显没有双引号
    ('span' + divnum + id1)
      

  4.   

    请确定你代码执行时,document.getElementById(""),那个ID的元素已经被加载。如果没有加载肯定会报错。
    别的错误,上面的高手们,已指出。