I got few onclick buttons inside li . I wonder how I can get the title of each button inside JavaScript function once it is clicked ?I want to set the title of button equal to a variable.Thanks in advance.
<javascript>
function MyFunction(MyFile,MyImage){
//here i want to get the title of onclick button which is Mango and set it equal to variable.
}
</javascript>
<li><a id="123456" onclick="setCurrentID('123456');javascript:MyFunction('type=fruit&day=friday','http://somesite.com/Image1.png');">Mango</a><img src="http://www.somesite.com/123456.png"></li>
<li><a id="123457" onclick="setCurrentID('123457');javascript:MyFunction('type=fruit&day=friday','http://somesite.com/Image2.png');">Apple</a><img src="http://www.somesite.com/123457.png"></li>