09.05 JavaScript Properties built-in properties custom properties DOM Document Object model

Source: Internet
Author: User

# Properties
# # # Built-in properties
* JS objects and HTML tags have a mapping relationship

# # # Custom Properties
* GetAttribute ()
* SetAttribute ()
* Hasattribute ()
* RemoveAttribute ()

# # # H5 New custom Attribute action action
* HTML:' <tag data-attr= ' > '
* JS:element.dataset.attr

# # # Attribute as attribute node
* GetAttributeNode (Attrname)



# content of the element
# # # As the element content of HTML
* InnerHTML
* outerHTML

# # # as plain text element content
* InnerText will ignore the extra spaces
* Textcontent ie9+

# # # As a text node operation




# element operation (node)
# # # Create elements
* Document.createelement (TagName)

# # # add Element (add child element to parent element)
* AppendChild (node)
* InsertBefore (NewNode, OldNode)

# # # Delete Element
* RemoveChild (node)

# # Replace Element
* ReplaceChild (NewNode, OldNode)

Clone Node # # #
* CloneNode (FALSE)



# dimension size of the element
Location of # # # elements
* Getboundingclientrect ()
* Offsetleft/offsettop
* Clientleft/clienttop
* OffsetParent

Dimensions of # # # elements
* Getboundingclientrect ()
* Offsetwidth/offsetheight
* Clientwidth/clientheight
* Scrollwidth/scrollheight


# # # scrolling Distance
* ScrollLeft
* ScrollTop


# docuemnt
# # Property
* URL Read Only
* Domain Read Only
* Referrer Read Only
* The last modified time of the LastModified document is read-only
* location-to-location object reference
* Title Document Header


# # # method
* Write ()
* WRITINLN ()


# form Dom
# # # FORM Element
* Submit ()
* Reset ()
* Elements

# # # button (Submit reset button)
* Click ()
* Blur ()
* Focus ()

# # # Radio/Check
* Click ()
* Blur ()
* Focus ()


# # # text (input textarea)
* Blur ()
* Focus ()
* Select ()


# # Select
* Add () new option

09.05 JavaScript Properties built-in properties custom properties DOM Document Object model

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.