//document类型 //Element类型

//document类型

    a.childNodes;
    a.childNodes[0];
    a.nodeType;
    a.nodeName;
    a.nodeValue;
    a.parent();
    a.nextSibling();
    a.previousSibling();
    a.firstChild();
    a.lastChild();
    a.parentNode();
    a.appendChild();
    a.insertBefore();
    a.replaceChild();
    a.removeChild();
    a.cloneChild();

    document.querySelectorAll();
    document.getElementById();
    document.getElementsByClassName();
    document.getElementsByTagName();
    document.getElementsByName();

    document.documentElement;
    document.body;
    document.doctype;
    document.title;
    document.URL;
    document.domain;
    document.anchors;
    document.applets;
    document.forms;
    document.images;
    document.links;

    document.write();
    document.writeln();
    document.open();
    document.close();

    window.onload = function (){
        //操作
    }

    //Element类型

    var a = document.getElementById("id");
    a.tagName = a.nodeName;

    var a = document.getElementById("id");
    a.id;
    a.className;
    a.title;
    a.lang;
    a.dir;
    a.id = "1111111";
    a.className = "1111111";
    a.title = "1111111";
    a.lang = "1111111";
    a.dir = "1111111";

    a.getAttribute();
    a.setAttribute();
    a.removeAttribute();

发表评论