Hi guys (and gals),
This is the problem:
I have (let’s say) a link on the page like this:
<a href=’something_useful.php’> Click me </a>
So what I need is to use a function in JavaScript to that will take that href attribute of the link and modify it if needed.
All of that I managed and it works, but only if I add ID=’something’ in the link
My final QUESTION id:
can I do this without giving the ID to the link ( there are many links on the page and I want it to be as small as possible – in KB ) and without getElementById.
If possible, code would be greately appreciated ( tried it for several times – but havent had any success )
Also – I think it could be done by getting all elements by the same TAG and counting them – but if there is still way with-out that it would be exelent, if not any solution will be enoungh.
Thanks ahead ! ?