JavaScript get child Element

Getting inner Div

var mainDiv = document.getElementById('mainDiv'),
childDiv = mainDiv.getElementsByTagName('div')[0],
requiredDiv = childDiv.getElementsByTagName('div')[1];

 


Leave a Reply

Your email address will not be published. Required fields are marked *

*