9.22 下午 (document对象)

document对象
 1、找元素:(1)gerElementById()根据ID找
        (2)gerElementByClassName()根据Class找,返回数组
          (3)gerElementByName()根据Name找,返回数组
        (4)gerElementByTagName()根据标签名找,返回数组
 2、操作内容:(1)、普通元素 【1】innerText获取内容文本
                 【2】innerHTML获取内容代码
         (2)、表单元素   value
 3、操作属性:(1) setAttribute(属性名,属性值)设置属性
         (2)removeAttribute(属性名)移除属性
         (3)getAttribute(属性名)获取属性
4、 操作样式    a.style

原文地址:https://www.cnblogs.com/l5580/p/5908997.html