Besides getelementbytagname
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br/> <HTML xmlns = "http://www.w3.org/1999/xhtml"> <br/> <pead> <br/> <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312 "/> <br/> <title> untitled document </title> <br/> </pead> </P> <p> <body> <br /> <Form ID = "one" name = "one"> </P> <p> <input type = "text" Title = "SADF" SD = "SDF" Name = "hello" Id = "hello" value = "1"/> <br/> <input type = "text" name = "hello" SD = "sasdfasdf" id = "hello" value = "2"/> <br/> <input type = "text" name = "hello" id = "hello" value = "3"/> <br/> <input type = "text" name = "hello" id = "hello" value = "4"/> <br/> <input type = "text" name = "hello" id =" hello "value =" 5 "/> <br/> <input type =" text "name =" hello "id =" hello "value =" 6 "/> <br/> <input type = "text" name = "hello" id = "hello" value = "7 "/> <Br/> <input type =" text "name =" hello "id =" hello "value =" 8 "/> <br/> <input type =" button "name =" SS "value =" 44 "onclick =" javascript: SS (); "/> <br/> </form> </P> <p> <MCE: script Type = "text/JavaScript" Language = "JavaScript"> <! -- <Br/> function SS () {<br/> var Ss = getfiles (); <br/> alert (ss [1]. SD); <br/>}</P> <p> function getfiles () {<br/> var files = new array (); <br/> var inputs = document. getelementsbytagname ("input"); </P> <p> for (VAR I = 0; I <inputs. length; I ++) <br/>{< br/> files [I] = inputs [I]; <br/>}</P> <p> return files; <br/>}</P> <p> window. onload = SS; <br/> // --> </MCE: SCRIPT> </P> <p> </body> <br/> </ptml>