getElementsByTagName resulting object

Today, practice using the DOM to create the html elements, want to get the body the object through getElementsByTagName ( "body"), and then set up the newly created element of the relationship, as shown below:

 

In fact, getElementsByTagName ( "body") is obtained by a pseudo-array mode in accordance with the need for access to an array of ways, but you can not call an array of methods, To recall, you will have to use Call or Apply method.

Guess you like

Origin www.cnblogs.com/NIFS/p/12313886.html