Hi,
You can do this by using the "anchors" object in
"Javascript".. Below is the Sample Code..
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<script language="javascript">
function fnCheckAnchors()
{
for (var i=0;i<document.anchors.length;i++)
{
alert(document.anchors.item(i));
}
}
</script>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form name="form" action="" method="post"
onsubmit="fnCheckAnchors();">
<a name="1" href="
http://www.yahoo.com">Yahoo</a><br
/>
<a name="2" href="
http://www.google.com">Google</a><br
/>
<a name="3" href="
http://www.altavista.com">Altavista</a><br
/>
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>