getElementsByTagName的用法
<HTML>
<HEAD>
<TITLE>New Document </TITLE>
<scriptlanguage=javascript>
functionck()
{
var aa =document.getElementsByTagName("input");
var ss ="";
alert("网页里所有的input集合共有:"+aa.length+"个!");
for (vari=0; i<aa.length; i++){
if (aa[i].type=="text")ss=ss+aa[i].value+"■";
}
alert(ss);
ss.value="sss";
alert(ss.value);
var bb = ss.split("■") ;
bb.value="wewwew";
alert(bb);
alert(bb.length);
}
</script>
</HEAD>
<BODY>
<FORMname=form1 METHOD=POST ACTION="">
<INPUT TYPE="text" NAME=txt>
<INPUT TYPE="text" NAME=txt1>
<INPUT TYPE="text" NAME=txt2>
<INPUT TYPE="text" NAME=txt3>
<INPUT TYPE="text" NAME=txt4>
<INPUT TYPE=buttononclick="ck();">
</FORM>
</BODY>
</HTML>
廖世勇