Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html>
<body>
<div id="main">
<p>Hello World!</p>
<p>Hello javascript!</p>
</div>
<p id="test"></p>
<script>
var x = document.getElementById("main");
var y = x.getElementsByTagName("p");
document.getElementById("test").innerHTML =
'The second paragraph (index 0) inside "main" is: ' + y[1].innerHTML;
</script>
</body>
</html> 
The most helpful JAVASCRIPT solutions
How can I get the last day and the next day in javascript ?JAVASCRIPT Click to see more ... 5.8K 507