jQuery html

jQuery DOM

1. text() : Sets or returns the text content of the selected element

2. html() : Sets or returns the content of the selected element (including html tags)

3. val() : Set or return the value of the form field

4. attr() : Get the attribute value

jQuery add element

1. append() : insert content at the end of the selected element (still inside the element)

2. prepend() : Insert content at the beginning of the selected element

3. after() : Insert content after the selected element

4. before() : Insert content before the selected element

jQuery remove element

1. remove() : removes the selected element and its children

2. empty() : remove child elements from the selected element (delete the child elements of the selected element)

jQuery get and set CSS class

1. addClass() : Add one or more classes to the selected element

2. removeClass() : removes one or more classes from the selected element

3. toggleClass() : The toggle operation of adding/removing the selected element

4. css() : Set or return style properties

jQuery size

1. width() : the width of the element (excluding padding/border/margin)

2. height() : the height of the element

3. innerWidth() : Returns the width of the element (including padding)

4. innerHeight() : returns the height of the element

5. outerWidth() : Returns the width of the element (including padding+border)

6. outerHeight() : returns the height of the element

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324813900&siteId=291194637