Hi everybody, ?
if i use the following code i will get an array with all elements in the document.
[CODE]var elements = document.getElementsByTagName(‘*’);
now i need to know what tags the elements have… But how do i do that?
What i want to accomplish:
1. get all elements
2. ask them if they have a name attribute, if true ignore them
3. ask them if they have an attribute lang, if not ignore them
4. ask them the value of lang
5. ask them what tag they have
6 on the base of lang and the tag display mode is choosen.
I try to build a multilanguage clientside-only website. The parts in different languages are marked with lang attributes. There is one defaut language that is set to visible even without js.
Now i have to search the whole document tree to find the elements with the lang Attribute and get the value. Then i have to know the tag to determine the mode of the display settings: list-item or inline or block, etc.
Hope you can tip me off.
Greets ?
Jens