js特效1

來源:互聯網
上載者:User

標籤:append   連接埠   win   forward   href   end   pen   地址欄   主機   

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(替換的節點,被替換的節點)

 

js特效1

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.