Syntax
document.all.tags(tag)
The tags() method provides a way to retrieve all HTML elements of a particular tag type from the document.all array.
The method returns an array of elements.
<html>
<a name="Paint"><h2><u>Paint Colors</u></h2></a>
Red<br>
Green<br>
Blue<br>
Orange<br>
<hr>
<script language="JavaScript">
<!--
var arrayOfAnchors = document.all.tags("A");
document.write("<a href='#",arrayOfAnchors[0].name,"'>");
document.write(arrayOfAnchors[0].name,"</a>");
-->
</script>
</html>