S
Sergio del Amo
Hi,
I am trying to create a web site to work in Opera 7.2, Explorer 6.0 and
Mozilla 1.4.
I have the code:
var imgs= document.getElementsByTagName("img");
alert(imgs[1].id);
The id of imgs[1] is a10. A window is open with Opera, Explorer and
Mozilla with the text "a10". When i write:
var imgs= document.getElementsByTagName("img");
alert(imgs[1].id[0]);
A window is open in Mozilla with the text "a". But in the other two with
the text "undefined".
Does anybody knows if there is a way to acces the first letter of a
string(in my case the string which contains the id name) with Explorer,
Mozilla and Opera??.
Thanks for your future feedback.
I am trying to create a web site to work in Opera 7.2, Explorer 6.0 and
Mozilla 1.4.
I have the code:
var imgs= document.getElementsByTagName("img");
alert(imgs[1].id);
The id of imgs[1] is a10. A window is open with Opera, Explorer and
Mozilla with the text "a10". When i write:
var imgs= document.getElementsByTagName("img");
alert(imgs[1].id[0]);
A window is open in Mozilla with the text "a". But in the other two with
the text "undefined".
Does anybody knows if there is a way to acces the first letter of a
string(in my case the string which contains the id name) with Explorer,
Mozilla and Opera??.
Thanks for your future feedback.