Access Relative Nodes Back

        <title>DOM Example</title>
        <p>Hello World!</p>
        <p>Isn't this exciting?</p>
        <p>You're learning to use the DOM!</p>
  • access <html />
var objHtml = this.document.documentElement;
  • access <head /> or <body />
var objHead = objHtml.firstChild;
var objBody = objHtml.lastChild;
var objHead = objHtml.childNodes.item(0);    // objHtml.childNodes[0]
var objBody = objHtml.childNodes.item(1);    // objHtml.childNodes[1]
var objHead = this.document.head;
var objBody = this.document.body;
Empty Comments
Sign in GitHub

As the plugin is integrated with a code management system like GitLab or GitHub, you may have to auth with your account before leaving comments around this article.

Notice: This plugin has used Cookie to store your token with an expiration.