Fetching parent element from child using javascript

I have a tableless html page, where the user controls are nested. On user interaction i need to fetch the details of the parent element when some interaction is made by the user on the child element.

<tr data-id="idtoget">
     <div>
          <div>
              <div id="childid">
                  <span onclick="getparentfromchild(event)">click here</span>
              </div>
          </div>
     </div>
 </tr>

when the user click on the span, I need to fetch the id of the parent element, "idtoget" in this example.