Ok What I wanted to do is to get the string length of a hyperlink from the getElementsByTagName array...
But for some reason the alert keeps saying undefined.. I have no idea what the problem is..
I tried to create an array in the code itself and I was able to get the length of the element...
-------
Here is the code if it helps..
---
<html>
<head>
<style type="text/css">
a{color:red;background
range}
.goo:first-letter{font-size:16pt;color:darkblue}
</style>
<script language=javascript>
function tt(){
AA = document.getElementsByTagName('a');
CC = AA.length;
teen = new Array();
for(TT = 0;TT < AA.length;TT++)
{
teen[TT] = AA[TT]
}
alert(teen[0].length)
}
</script>
</head>
<body onLoad=tt()>
<div align=center>
<a href="<a href="<a href="</div>
<div class=goo>
this is just a test to see if something will change or not </div>
</body>
</html>
But for some reason the alert keeps saying undefined.. I have no idea what the problem is..
I tried to create an array in the code itself and I was able to get the length of the element...
-------
Here is the code if it helps..
---
<html>
<head>
<style type="text/css">
a{color:red;background
.goo:first-letter{font-size:16pt;color:darkblue}
</style>
<script language=javascript>
function tt(){
AA = document.getElementsByTagName('a');
CC = AA.length;
teen = new Array();
for(TT = 0;TT < AA.length;TT++)
{
teen[TT] = AA[TT]
}
alert(teen[0].length)
}
</script>
</head>
<body onLoad=tt()>
<div align=center>
<a href="<a href="<a href="</div>
<div class=goo>
this is just a test to see if something will change or not </div>
</body>
</html>