Javascript How to get parent element value without ID

I need to get the parent node value from the current node click event (without using ID, since the data is generated using some automated process, so i don’t know the ID value during construction of element).

I used the following code to achieve this

JS :
function fnGetParentNodeValue(anchorTag)
{

var ParentContent = document.activeElement.parentElement.children[0].innerHTML;
alert(ParentContent);
}

HTML :

<div><a href=”javascript:fnGetParentNodeValue(this)”>GetParentData</a></div>