In my html page I have a many links that their ID can change all the time it looks something like that (I have around 140 links):
<a id=33 onclick="javascriptfunction()"
href="33">link1</a>
<a id=37 onclick="javascriptfunction()"
href="37">link2</a>
<a id=113 onclick="javascriptfunction()"
href="113">link3</a>
<a id=3 onclick="javascriptfunction()"
href="3">link4</a>
.....
.....
.....
Client can randomly select one of them and I want to perform operation in javascriptfunction() that is of course in JavaScript based on their element ID.
Is there a way to get in JavaScript(no jQuery) the link element ID which was clicked?
". Next: an ID cannot start with a number!onclick="alert this.id"@Bram 1) wrong - it's html not xml 2) wrong too, html5 assumed.