how to get the html element in javascript?

+1 vote
63 views
asked Jul 22, 2015 in HTML5 by jonathan (3,105 points)
Hi All

   how to get the html element in javascript?

1 Answer

+1 vote
answered Jul 22, 2015 by john (4,220 points)
Hi Jonathan

  You can use any one of the statment to get the element value in Java script.

var x = document.getElementById("main");

var y = x.getElementsByTagName("p");
...