kingdomzhf(旭日东升)兄说的没错啊!这个函数是你自己定义的(可能是dw,自动生成的)

解决方案 »

  1.   

    你说的是这个函数吧?
    function MM_findObj(n, d) { //v4.01
      var p,i,x;
      if(!d)
        d=document;
      if((p=n.indexOf("?"))>0&&parent.frames.length)
       {
         d=parent.frames[n.substring(p+1)].document;
      n=n.substring(0,p);
    }
      if(!(x=d[n])&&d.all) 
       x=d.all[n]; 
      for (i=0;!x&&i<d.forms.length;i++)
       x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++)
       x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) 
      x=d.getElementById(n);
       return x;
    }
    其实最主要的是这句: x=d.getElementById(n);语法:
    oElement = document . getElementById ( sID ) 
    参数:
    sID  : 必选项。字符串(String)。 返回值:
    oElement  : 对象(Element)。 说明:
    根据指定的 id 属性值得到对象。返回 id 属性值等于 sID 的第一个对象的引用。假如对应的为一组对象,则返回该组对象中的第一个。 
    如果无符合条件的对象,则返回 null 。 
      

  2.   

    getElementById这个阿!是根据ID获得对象