javascript - Uncaught TypeError: Cannot read property 'getElementsByTagName' of null -


I'm trying this but .getElementsByTagName () is used, an error Generated:

  var tag = document.body.getElementsByTagName ("*"); Uncaught TypeError: Why is this error producing, and how can I fix it?  
"post-text" itemprop = "text">

document body Will not be assigned unless the body element is created.

and element & lt; Script & gt; element element (because you are trying to get all the elements, you want to be in the end of the body element) or it can be kept in a function and it is such a Call from the event that sets fire after the body build (such as window load events).

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -