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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -