Chikwado Posted March 25, 2016 Share Posted March 25, 2016 In html node tree what do you call the first div specify in the body. For example: If i have one div with two paragraph. Link to comment Share on other sites More sharing options...
davej Posted March 25, 2016 Share Posted March 25, 2016 document.getElementsByTagName("DIV")[0] Link to comment Share on other sites More sharing options...
Chikwado Posted March 25, 2016 Author Share Posted March 25, 2016 (edited) Ok, what of the first paragraph inside the first div? Edited March 25, 2016 by Chikwado Link to comment Share on other sites More sharing options...
davej Posted March 25, 2016 Share Posted March 25, 2016 document.getElementsByTagName("DIV")[0].getElementsByTagName("P")[0] Link to comment Share on other sites More sharing options...
Chikwado Posted March 26, 2016 Author Share Posted March 26, 2016 Ok, Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now