First of all I do not want to use jQuery, just pure javascript; please don\'t link to duplicate jQuery posts.
If I have a list like
pass its id as parameter into the onclick-function.
this.getAttribute('id')