Length = document.anchors[n].length Name = document.anchors[n].name |
数を返す 名前を返す |
<A NAME="anchors1">anchors1</A> <A NAME="anchors2">anchors2</A> <A NAME="anchors3">anchors3</A><BR><BR> <SCRIPT TYPE="text/JavaScript"> <!-- document.write( "Length: ", document.anchors.length, "<BR>" ); for( i = 0 ; i < document.anchors.length ; i++ ) { document.write( "Name : ", document.anchors[i].name, " <BR>" ); } //--> </SCRIPT> |