Java Programmer's JS (a) Getting Started

Source: Internet
Author: User

Background: Using JS to do a WEB project, has been a function of using JS, suddenly a day project re-planning, began to manually write some of the original JS, the situation is not good, the original has been used by colleagues to build a framework in the development, the basis of JS 0 I have been ctrl+c/ctrl+ V repetitive operation, occasionally write some local events, for what is js/ajax/jquery/$ not know.

I. js/ajax/jquery/$ comparison, let's start with the conclusion that there is no comparability between them .

Before the beginning of the js/ajax/jquery/$ silly confused, intuitive use of feeling is a thing, in fact, they have no comparability after:

1. JS is a language; Equivalent to the Java language;

2. Ajax is a technology;

3. JQuery is a library or framework; Equivalent to JavaBean, developed on the basis of Java, to be more convenient to deal with a certain type of business generated;

4. $ is an alias for JQuery;

Two. js/ajax/jquery/$ Concept Understanding

1. What is JS

JS is the abbreviation for JavaScript,JavaScript is a lightweight scripting language , used to add dynamic effects to static pages, mainly used in Web project development or some Web sites;

Parsing the JavaScript interpreter becomes part of the JavaScript engine for the browser. Web clients are mostly browsers, using JS on the other hand to improve the efficiency of browser access and reduce the load of the server.

2. What is Ajax

 Ajax is a technology that enables asynchronous requests and partial updates ; The so-called asynchronous, is to send a request to the server, do not have to wait for results to do other things; The so-called partial update, is not to load the entire page, just to the server request a small amount of data, to achieve the effect of local update;

A: asynchronous;  J:javascript; A:and; X:xml;

 Benefits: Reduce the amount of data transmitted, reduce server load, and shorten user wait time;

Eg:1. The stock fluctuation chart on the webpage, before Ajax, is automatically refresh the interface every 10 seconds; Ajax, only part of the content changes;

2. Friend punctuate praise, interface effect: Just updated the amount of data like the point like;

 Description: Ajax is a section of code written with JS, used to achieve the function of JS with the background interaction;

3. What is JQuery

JQuery is a library or frame of JS, it is compatible with CSS3 and different browsers (JQuery2 does not support IE6.7.8);

With jquery, you can achieve the effect of Write less does more, and with very little code you can do some of the more complicated work, and the enhancements to jquery are reflected in the following points:

1. Access the HTML node and do some operations on it;

2. event handling;

3. Animation;

4. Ajax interoperability in fast WEB development;

  Description: jquery is very powerful, the code is also relatively refined, jquery easy to use, is just to do front-end development of the first choice of people, but many with the development of jquery for many years front-end engineers, abandon jquery to JS code can not understand is now a normal (by many front-end Daniel despised), When you can use jquery, you need to go back to the JS Grammar to do a re-learning, to avoid knowing it but do not know why the situation.

4. What is $

In jquery, the $ sign is an alias for jquery, and the default jquery class library begins with jquery.

Three. Association between js/ajax/jquery/$

JS is the language foundation for the realization of dynamic Web pages;

Ajax is a section of JS code, a technology used in the background interaction;

JQuery is a class library, based on a number of common operations of a lightweight JS library, is used by most front-end development;

$ is an alias for JQuery

Java Programmer's JS (a) Getting Started

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.