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

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -