Javascript examples for DOM:Element childNodes
Access innerHTML on child node from element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from w w w .j a v a 2 s . c o m*/ console.log(document.getElementsByClassName('myClass')[0].childNodes[1].innerHTML); }); </script> </head> <body> <div id="myDiv"> <h1 class="myClass"> <a href="link">TEXT</a> </h1> </div> </body> </html>