zoukankan      html  css  js  c++  java
  • js特效

    window
    history 前进后退
    location 地址栏
    document 文档内容

    history
    history.forward() //前进到下个页面
    history.back() //返回到上个页面

    history.go(n);
    n为-1 返回上个页面
    n为1 前进下个页面
    n为0 刷新当前页面

    location.
    host 设置和返回 主机名/URL的端口号
    hostname 设置和返回 URL的主机名
    href 设置和返回完整URL 可跳转
    hash 设置和返回 #开始的URL
    search 设置和返回 ?开始的URL

    reload() 刷新
    replace() 新文档替换当前文档


    document

    write()
    getElementById() 根据id返回指定id的第一个对象
    getElementsByTagName() 根据标签名返回指定名的对象集合
    getElements ByName() 根据名字返回指定名的对象集合

    innerHTML("content");

    getElementByTagName("id").innerHTML=;
    firstElementChild
    lastElementChild

    getElementsByTagName
    getElementByTagName

    getElementsByTagName()[0]

    getAttribute("");
    setAttribute("属性名",""属性值");

    createElement
    Anode.appendChild(Bnode)
    insertBefore(Anode,Bnode)
    node.cloneNode(true or false)
    true克隆所有子节点 false克隆该节点 包括属性

    removeChild(node) 删除节点
    replaceChild(替换的节点,被替换的节点)

  • 相关阅读:
    bzoj2045: 双亲数&bzoj1101: [POI2007]Zap
    spoj GCDEX
    jQuery Ajax
    jQuery 动画效果
    jQuery 事件处理API
    jQuery 常用getter&setter
    jQuery 文档操作
    jQuery 基础
    Vue2.2.0+新特性整理
    JavaScript中的HTTP
  • 原文地址:https://www.cnblogs.com/m97i/p/6915917.html
Copyright © 2011-2022 走看看