因为页面的特殊需要一定要用document.all("12345678").name
这个方法可以alert出来,但是如果id是个变量,变量是数字,好像不行,dd='1111';
document.all(dd).name

解决方案 »

  1.   

    ID Attribute | id Property--------------------------------------------------------------------------------Retrieves the string identifying the object.SyntaxHTML <ELEMENT ID = sID ... > 
    Scripting [ sID = ] object.id 
    Possible ValuessID Any alphanumeric string that begins with a letter. The underscore (_) can also be used. In Microsoft&reg; Internet Explorer 5 and later, the property is read/write. The property has no default value.以字母开头的数字,字母和下划线的组合串.
      

  2.   

    运行的时候用eval试试
    dd='1111';
    eval("document.all("+dd+").name")