Is it possible to get a child dom element, which will be the first child of a specific type.
For example in both of these examples I want to get the img ele
img
var anchor = document.getElementById('mylink'); var images = anchor.getElementsByTagName('img'); var image = images.length ? images[0] : null;