循环呀,每个文本框给一个自增的ID,比如有10个
dim a(10)
for i=1 to 10
  a(i)=requeset("name"&i&")
next

解决方案 »

  1.   

    var objs=document.getElementsByName("name1");
    var input1=objs[0];
    alert(input1.value);
      

  2.   

    alert(document.all("name1").value)
      

  3.   

    fokker(独孤龙)谢谢了,但我不明白什么时候用document.all(name1)这种方法,这种用法的含义是什么?
      

  4.   

    document.all包含了document里面的所有元素。
    着是msdn里面的解释Returns a reference to the collection of elements contained by the object.Syntax[ collAll = ] object.all 
    [ oObject = ] object.all(vIndex [, iSubIndex]) Possible ValuescollAll Array of elements contained by the object.  
    oObject Reference to an individual item in the array of elements contained by the object. 
    vIndex Required. Integer or string that specifies the element or collection to retrieve. If this parameter is an integer, the method returns the element in the collection at the given position, where the first element has value 0, the second has 1, and so on. If this parameter is a string and there is more than one element with the name or id property equal to the string, the method returns a collection of matching elements. 
    iSubIndex Optional. Position of an element to retrieve. This parameter is used when vIndex is a string. The method uses the string to construct a collection of all elements that have a name or id property equal to the string, and then retrieves from this collection the element at the position specified by iSubIndex. MembersAllAttributesPropertiesMethodsEventsCollectionsBehaviors   Description 
    item  Retrieves an object or a collection from the specified collection. 
    length  Retrieves the number of objects in a collection. 
    tags  Retrieves a collection of all object that have the specified HTML tag name. 
    urns  Retrieves a collection of all objects to which a specified behavior is attached. * denotes an extension to the W3C DOM.
    ResThe all collection includes one element object for each valid HTML tag. If a valid tag has a matching end tag, both tags are represented by the same element object. The collection returned by the document's all collection always includes a reference to the HTML, HEAD, title, and body objects regardless of whether the tags are present in the document. If the document contains invalid or unknown tags, the collection includes one element object for each. Unlike valid end tags, unknown end tags are represented by their own element objects. The order of the element objects is the HTML source order. Although the collection indicates the order of tags, it does not indicate hierarchy.