Respuesta :

tonb
You want to find it based on what? Here's a solution if you want to find it based on id:

function GetElementInsideContainer(containerID, childID) {
   var elm = document.getElementById(childID);
   var parent = elm ? elm.parentNode : {};
   return (parent.id && parent.id === containerID) ? elm : {};
}