Jquery method summary

Source: Internet
Author: User

Jquery method summary

1. find ()

The find () method gets the descendant of each element in the current element set, and filters by selector, jQuery object, or element.
Example:
((P).find(span).css ('color', 'red'); // search for the descendant span element in all p tags and set its color to red
2. html ()

The html () method returns or sets the content of the selected element. [This is equivalent to modifying el. innerHTML]

3. ajax

$ (Document). ready (function (){
$ (# Btn). on (click, function (){
$. Get (Server. php, {name :( # namevalue). value), function (data ){
$ (# Result). text (data );
}). Error (function (){
$ (# Result). text (error );
});
});
})

4. push

The push () method can add one or more elements to the end of an array and return a new length.
ArrayObject. push (newelement1, newelement2,..., newelementX)
The push () method can add its Parameter order to the end of arrayObject.
It directly modifies the arrayObject instead of creating a new array. The push () and pop () methods use the advanced post-stack functions provided by arrays.

 

 

Related Article

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.