I have a list of links which all have different values but the same id (yes that was my mistake). How can I get the value of the link please see below for my link code.
<a href='#' id='bookmark' onclick='bookmark()' value='"+rtndata[j].venueid+"'></a>
When the link is clicked the function bookmark is called within that function I want to get the value of the link clicked
any help will be greatly appreciated
when i try this
var button = this.getAttribute('value');
i get the error this.getAttribute is not a function what seems to be the problem?
It means that this keyword is not an object that has the getAttribute method, which means that the this keyword in that particular situation quite likely refers to the window object instead.
See the following url, I modified your HTML markup a bit, but it works.