how to check does children elemnt exist or not using javascrot code example Example: how to check if a tag has any chidren tag.hasChildNodes()