Click to See Complete Forum and Search --> : Question


bekos
01-22-2004, 08:48 AM
Hello I've got a question: I've got an element like the following:

<Time set="Month10" />. What I want is to access the attribute (the Month10) without having to write it everytime for example by accessing it with a variable like $MONTH

How can I make the reference?

Is it possible? and if so how?

Thank you!

Khalid Ali
01-22-2004, 09:10 AM
not sure if I understood you correctly,
to access the elements attribute you can get a reference to the element and then get its attributes
by using
element.getAttribute("set");

I'd recoment read up the DOM documentation at
w3c.org