成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專(zhuān)欄INFORMATION COLUMN

一個(gè)html標(biāo)簽到底包含了多少信息(1)

lylwyy2016 / 3451人閱讀

摘要:先來(lái)看一段代碼可以看到很多,來(lái)整理一下,總共有三大類(lèi)我自己分的,沒(méi)有科學(xué)依據(jù)除了一些私有屬性方法比如的私有屬性等和一些空的屬性根據(jù)類(lèi)型又分為了幾個(gè)小分類(lèi)普通屬性樣式屬性操作屬性其他對(duì)象屬性我不知道的類(lèi)型下一節(jié)詳細(xì)分析

先來(lái)看一段代碼:

var dom = document.querySelector("body");
for(var i in dom){
    console.log(i,dom[i])
}

可以看到很多,來(lái)整理一下,總共有三大類(lèi)(我自己分的,沒(méi)有科學(xué)依據(jù))

除了一些私有屬性、方法(比如a的私有屬性href等)和一些空的屬性

attributes

events

methods

attributes

根據(jù)value類(lèi)型又分為了幾個(gè)小分類(lèi):

1.普通屬性

text
link
vLink
aLink
title
lang
translate true
dir
hidden false
tabIndex -1
accessKey
draggable false
spellcheck true
contentEditable inherit
isContentEditable false
innerText
images
Features
outerText
webkitdropzone
namespaceURI http://www.w3.org/1999/xhtml
prefix null
innerHTML
outerHTML
shadowRoot null
baseURI
isConnected true
baseURI http://192.168.1.86/bootstrap/index.html?#1
isConnected true
nodeValue null
textContent

2.樣式屬性

bgColor
background
offsetTop 0
offsetLeft 0
offsetWidth 1333
offsetHeight 50
scrollTop 0
scrollLeft 0
scrollWidth 1333
scrollHeight 950
clientTop 0
clientLeft 0
clientWidth 1333
clientHeight 50

3.dom操作屬性

offsetParent null
localName body
tagName BODY
previousElementSibling
nextElementSibling
children
firstElementChild
lastElementChild
childElementCount
nodeType 1
nodeName BODY
ownerDocument #document
parentNode
parentElement
childNodes
firstChild
lastChild
previousSibling
nextSibling null

4.其他對(duì)象屬性

style CSSStyleDeclaration {}
dataset DOMStringMap {}
attributes NamedNodeMap {length: 0}

5.我不知道的類(lèi)型

ELEMENT_NODE 1
ATTRIBUTE_NODE 2
TEXT_NODE 3
CDATA_SECTION_NODE 4
ENTITY_REFERENCE_NODE 5
ENTITY_NODE 6
PROCESSING_INSTRUCTION_NODE 7
COMMENT_NODE 8
DOCUMENT_NODE 9
DOCUMENT_TYPE_NODE 10
DOCUMENT_FRAGMENT_NODE 11
NOTATION_NODE 12
DOCUMENT_POSITION_DISCONNECTED 1
DOCUMENT_POSITION_PRECEDING 2
DOCUMENT_POSITION_FOLLOWING 4
DOCUMENT_POSITION_CONTAINS 8
DOCUMENT_POSITION_CONTAINED_BY 16
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC 32

events

onbeforecopy null
onbeforecut null
onbeforepaste null
oncopy null
oncut null
onpaste null
onsearch null
onselectstart null
onwheel null
onwebkitfullscreenchange null
onwebkitfullscreenerror null
onblur null
onerror null
onfocus null
onload null
onresize null
onscroll null
onbeforeunload null
onhashchange null
onlanguagechange null
onmessage null
onoffline null
ononline null
onpagehide null
onpageshow null
onpopstate null
onstorage null
onunload null
onorientationchange null
onrejectionhandled null
onunhandledrejection null
onabort null
oncancel null
oncanplay null
oncanplaythrough null
onchange null
onclick null
onclose null
oncontextmenu null
oncuechange null
ondblclick null
ondrag null
ondragend null
ondragenter null
ondragleave null
ondragover null
ondragstart null
ondrop null
ondurationchange null
onemptied null
onended null
oninput null
oninvalid null
onkeydown null
onkeypress null
onkeyup null
onloadeddata null
onloadedmetadata null
onloadstart null
onmousedown null
onmouseenter null
onmouseleave null
onmousemove null
onmouseout null
onmouseover null
onmouseup null
onmousewheel null
onpause null
onplay null
onplaying null
onprogress null
onratechange null
onreset null
onseeked null
onseeking null
onselect null
onshow null
onstalled null
onsubmit null
onsuspend null
ontimeupdate null
ontoggle null
onvolumechange null
onwaiting null
ontouchcancel null
ontouchend null
ontouchmove null
ontouchstart null

methods

click click() { [native code] }
focus focus() { [native code] }
blur blur() { [native code] }
hasAttributes hasAttributes() { [native code] }
getAttribute getAttribute() { [native code] }
getAttributeNS getAttributeNS() { [native code] }
setAttribute setAttribute() { [native code] }
setAttributeNS setAttributeNS() { [native code] }
removeAttribute removeAttribute() { [native code] }
removeAttributeNS removeAttributeNS() { [native code] }
hasAttribute hasAttribute() { [native code] }
hasAttributeNS hasAttributeNS() { [native code] }
getAttributeNode getAttributeNode() { [native code] }
getAttributeNodeNS getAttributeNodeNS() { [native code] }
setAttributeNode setAttributeNode() { [native code] }
setAttributeNodeNS setAttributeNodeNS() { [native code] }
removeAttributeNode removeAttributeNode() { [native code] }
closest closest() { [native code] }
matches matches() { [native code] }
webkitMatchesSelector webkitMatchesSelector() { [native code] }
getElementsByTagName getElementsByTagName() { [native code] }
getElementsByTagNameNS getElementsByTagNameNS() { [native code] }
getElementsByClassName getElementsByClassName() { [native code] }
insertAdjacentElement insertAdjacentElement() { [native code] }
insertAdjacentText insertAdjacentText() { [native code] }
insertAdjacentHTML insertAdjacentHTML() { [native code] }
createShadowRoot createShadowRoot() { [native code] }
getDestinationInsertionPoints getDestinationInsertionPoints() { [native code] }
requestPointerLock requestPointerLock() { [native code] }
getClientRects getClientRects() { [native code] }
getBoundingClientRect getBoundingClientRect() { [native code] }
scrollIntoView scrollIntoView() { [native code] }
scrollIntoViewIfNeeded scrollIntoViewIfNeeded() { [native code] }
animate animate() { [native code] }
remove remove() { [native code] }
webkitRequestFullScreen webkitRequestFullScreen() { [native code] }
webkitRequestFullscreen webkitRequestFullscreen() { [native code] }
querySelector querySelector() { [native code] }
querySelectorAll querySelectorAll() { [native code] }
hasChildNodes hasChildNodes() { [native code] }
normalize normalize() { [native code] }
cloneNode cloneNode() { [native code] }
isEqualNode isEqualNode() { [native code] }
isSameNode isSameNode() { [native code] }
compareDocumentPosition compareDocumentPosition() { [native code] }
contains contains() { [native code] }
lookupPrefix lookupPrefix() { [native code] }
lookupNamespaceURI lookupNamespaceURI() { [native code] }
isDefaultNamespace isDefaultNamespace() { [native code] }
insertBefore insertBefore() { [native code] }
appendChild appendChild() { [native code] }
replaceChild replaceChild() { [native code] }
removeChild removeChild() { [native code] }
addEventListener addEventListener() { [native code] }
removeEventListener removeEventListener() { [native code] }
dispatchEvent dispatchEvent() { [native code] }

下一節(jié)詳細(xì)分析

文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/79642.html

相關(guān)文章

  • 前端領(lǐng)域的BEM到底是什么

    摘要:在這篇譯什么是我們?yōu)槭裁葱枰麄兊慕Y(jié)尾處,明確指出不需要,那么到底是什么呢下面我將把官網(wǎng)的教程翻譯出來(lái),帶領(lǐng)大家搞清楚前端領(lǐng)域的到底是什么。命名在計(jì)算機(jī)科學(xué)領(lǐng)域,只有個(gè)非常難解決的問(wèn)題一個(gè)是緩存失效,而另一個(gè)則是命名。 在這篇【譯】什么是CSS Modules ?我們?yōu)槭裁葱枰麄??的結(jié)尾處,明確指出CSS Modules不需要BEM,那么BEM到底是什么呢? 下面我將把BEM官網(wǎng)的教...

    GitChat 評(píng)論0 收藏0
  • 前端入門(mén)2-HTML標(biāo)簽

    摘要:標(biāo)簽用于表示代碼塊。而所有行的單元格都是表格的主要內(nèi)容,因此都在標(biāo)簽中。引入表格結(jié)構(gòu)標(biāo)簽,是為了更好的區(qū)分出各個(gè)單元格的含義。 本篇文章已授權(quán)微信公眾號(hào) dasu_Android(大蘇)獨(dú)家發(fā)布 聲明 本系列文章內(nèi)容全部梳理自以下四個(gè)來(lái)源: 《HTML5權(quán)威指南》 《JavaScript權(quán)威指南》 MDN web docs Github:smyhvae/web 作為一個(gè)前端小白,入門(mén)跟...

    NickZhou 評(píng)論0 收藏0
  • 程序員到底要學(xué)什么?

    摘要:程序員到底要學(xué)什么程序員到底要學(xué)什么或者說(shuō),程序員到底要學(xué)多少東西呢這個(gè)問(wèn)題問(wèn)到你了嗎今天就來(lái)簡(jiǎn)單聊一聊程序員的學(xué)習(xí)之路。程序員的種類(lèi)很多,這里只講前端工程師和后端工程師,因?yàn)樽约阂簿徒佑|到這兩個(gè)層面。 ...

    mo0n1andin 評(píng)論0 收藏0
  • 前端移動(dòng)端適配總結(jié)

    摘要:設(shè)備像素比縮寫(xiě)簡(jiǎn)稱,也就是我們經(jīng)常在谷歌控制臺(tái)移動(dòng)端調(diào)試頂端會(huì)看到的一個(gè)值。在移動(dòng)端,默認(rèn)的情況下,布局視口的寬度是要遠(yuǎn)遠(yuǎn)大于瀏覽器的寬度的。手淘團(tuán)隊(duì)布局現(xiàn)今,適配手機(jī)端 meta標(biāo)簽到底做了什么事情 做過(guò)移動(dòng)端適配的小伙伴一定有遇到過(guò)這行代碼: 但是,很多小伙伴只是感性的認(rèn)識(shí):噢,我加了這行代碼,然后頁(yè)面的寬度就會(huì)跟我的設(shè)備寬度一致。然而,這種理解是很片面的。那么,這句話的本質(zhì)到底...

    sydMobile 評(píng)論0 收藏0

發(fā)表評(píng)論

0條評(píng)論

最新活動(dòng)
閱讀需要支付1元查看
<