WebAPI第二天知識點總結

2021-10-10 03:57:55 字數 960 閱讀 4372

滑鼠經過事件onmouseover

滑鼠離開事件onmouseout

獲取屬性值:

element.屬性 獲取內建屬性值(元素本身自帶的屬性)

element.getattribute(『屬性』) 主要獲得自定義的屬性

設定屬性值:

element.屬性 設定內建屬性值

element.setattribute(『屬性』) 主要設定自定義的屬性

移出屬性:

element.removeattribute(『屬性』)

設定h5自定義屬性:

h5規定自定義屬性data-開頭做為屬性名並且賦值

獲取h5自定義屬性:

element.getattribute(『data-index』) 相容性獲取

網頁中的所有內容都是節點(標籤、屬性、文字、注釋等),在dom 中,節點使用 node 來表示。節點至少擁有nodetype(節點型別)、nodename(節點名稱)和nodevalue(節點值)這三個基本屬性。

父級節點:node.parentnode

子節點:parentnode.childnodes

子元素節點:parentnode.children

第乙個子節點:parentnode.firstchild

最後乙個子節點:parentnode.lastchild

第乙個子元素節點:parentnode.firstelementchild

最後乙個子元素節點:

parentnode.lastelementchild

建立節點:

document.createelement(『tagname』)

新增節點:

第二天知識總結

回顧邏輯運算 print 6 or 2 1 print 0 or 5 4 print 5 4 or 3 print 3 and 2 1 print 0 and 3 1 print 2 1 and 3 print 3 1 and 0 要滿足兩邊都是真才是真,所以此時輸出0而不是f 計算1 2 3 99...

第二天總結

1.數 算符 取餘 取模 整除 冪運算 1.1取個位數 對10取餘 例如 num 8925 print num 10 結果等於 51.2整除和取餘 對後面兩位取餘 例如num 8925 print num 100 結果等於 251.3提取數字8925中的9 例如 num 8925 num 8925 ...

前端學習第二天 flex布局知識點總結歸納

flex布局簡單介紹 2009年,w3c 提出了一種新的方案 flex 布局,可以簡便 完整 響應式地實現各種頁面布局。目前,它已經得到了所有瀏覽器的支援,這意味著,現在就能很安全地使用這項功能。目錄 一,flex 布局是什麼?二,基本概念 三,flex容器屬性 父容器屬性 子項屬性 屬性 值 作用...