Web front-end Framework development technology

Source: Internet
Author: User

The first chapter of jquery (Theoretical knowledge)

The difference between 1.jQuery and javascript:

jquery is an extension of JavaScript, encapsulation, is to make JavaScript more useful

2. Understand the advantages of jquery
OpenSource-Open Source code
Lightweight
Powerful Selector
Excellent DOM manipulation (one additions and deletions to DOM elements)
Perfect Ajax, excellent browser compatibility, rich plugin support, complete documentation (instructions)
Chain operation, write less, do more
(write less, does more)

3. Mastering the differences between jquery objects and Dom objects

var name = document.getElementById ("name"); Jsdom Object
alert (Name.value); Get its value by getting to the object
var $name = $ ("#name");//jquery Object
var $name 1 = $ (name). Val (); The DOM object is converted to a JQuery object, and the method of the jquery object can be used after the conversion;
var name1 = $name. Get (0); Convert the jquery object to a DOM object;

4. Summarize the points of knowledge:
1: The first very important jquery function: jquery (document). Ready (function () {code to execute}) is equivalent to $ (function () {code to execute})

$ (function () {code to execute}) is equivalent to JS's Window.onload=function () {}

2: Another document loading complete event: Body's onload event
It differs from the jquery form Load event: The general onload event has only one, and if the page has more than one onload event, only the last one is executed, and the jquery document loads the function
can have more than N, and each one will be in order
jquery Document loading complete function execution events are older than body onload events (especially when there are a large number of images on the page that need to be loaded, the difference between the two is more pronounced)

Web front-end Framework development technology

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.