SoFunction
Updated on 2025-04-10

js code to determine whether an element is a child element of another element


function isParent (obj,parentObj){
while (obj != undefined && obj != null && () != 'BODY'){
if (obj == parentObj){
return true;
}
obj = ;
}
return false;
}