The relationship between JavaScript, jquery and Ajax _javascript skills

Source: Internet
Author: User
Tags object model tag name xslt

In the previous article to introduce a JavaScript jquery ajax summary, and then introduce JavaScript jquery and Ajax relationship, interested friends to study together

Simple summary:

1, JS is a front-end language.

2, Ajax is a technology, it provides an asynchronous update mechanism, the use of client and server Exchange data rather than the entire page document, to achieve a local update of the page.

3. jquery is a framework that encapsulates JS to make it easier to use. jquery makes JS and Ajax easier to use

Detailed information:

Actually only one of the them is a programming language.
Javascript is a programming language which is used mainly to webpages for making websites. When a webpage was parsed by the browser, it creates a in-memory representation of the page. It is a tree structure, which contains all elements on the page. So there are a root element, which contains the head and the body elements, which contain other elements, which contain oth ER elements. So it looks like a tree basically. Now with JavaScript, can manipulate elements in the page using this tree. Can pick elements by their ID (GetElementsById), or their tag name (getElementsByTagName), or by simply going The tree (parentnode, FirstChild, LastChild, nextSibling, previoussibling, etc.). Once you have element (s) to work with your can modify them by changing their, content or position on the page. This interface is also known as the DOM (Document Object Model). So can do everything with Javascript this another programming language can do, and by using it embeddedInto wepages your also get a in-memory Object of the current webpage by which you can make changes to the page interactive Ly.
AJAX is a technique of communication between the browser and the server within a page. Chat is a good example. In the write a message, send a and recive the messages without leaving the page. You can manage this interaction with Javascript on the client side, using a XMLHTTP Object provided by the browser.
The JQuery is a library which aims for simplify client side web development in general (the two other above). It creates a layer of abstracion so can reuse common languages like CSS and HTML in Javascript. It also includes functions which can be used to communicate with servers very (AJAX). It is written in Javascript, and won't does everything for you, only makes common tasks easier. It also hides some of the misconceptions and bugs of browsers.
To sum up:
Javascript is a programming language (objects, array, numbers, strings, calculations)
AJAX and JQuery uses Javascript
The jQuery is for simplifing common tasks with AJAX and page manipulation (style, animation, etc.)
Finally, an example just to the some syntax:
Page manipulation in JavaScript
var el = document.getElementById ("box");
El.style.backgroundColor = "#000";
var new_el = document.createelement ("div");
el.innerhtml = "<p>some content</p>";
El.appendchild (New_el);

And how to would do it in JQuery
$ ("#box")
. css ({"Background-color": "#000"})
. Append ("<div><p>some content</p></div>");

1.javascript is a scripting language that executes on the client. Ajax is a technology based on JavaScript, and its main purpose is to provide asynchronous refreshes (only part of the page is refreshed, not the entire page is refreshed). One is language, the other is technology, and there is an essential difference between them.

2.javascript is a scripting language executed on the browser side, Ajax is a development technique for creating interactive Web applications that utilizes a range of related technologies including JavaScript.

3.

What can JavaScript do?

There are a lot of things you can do with JavaScript to make your pages more interactive and provide a better, more exciting experience for your site's users. JavaScript allows you to create an active user interface that gives feedback to users as they navigate between pages.

Use JavaScript to ensure that users enter valid information in a form, which can save you business time and expense.

Using JavaScript, you can create custom HTML pages based on user actions.

JavaScript can also work with forms, set cookies, instantly build HTML pages, and create web-based applications.

What can't javascript do?

JavaScript is a client language. (In fact, there are also JavaScript versions of server-side implementations). In other words, it is designed to perform tasks on the user's machine, not on the server. As a result, JavaScript has some inherent limitations, which are mainly for the following security reasons:
1.JavaScript is not allowed to read and write files on client machines. This is good because you don't want the Web page to read the files on your hard disk, or to write the virus to a hard disk, or to manipulate files on your computer. The only exception is that JavaScript can be written to the browser's cookie file, but there are some limitations.
2.JavaScript is not allowed to write files on the server machine. Although the files on the write server are convenient in many ways (such as storing page clicks or data that the user fills out the form), JavaScript does not allow this. Instead, you need to use a program on the server to process and store the data. This program can be a program or Java program written in a language like Perl or PHP that runs on a server.

3.JavaScript cannot close a window that is not opened by itself. This is to prevent a site from shutting down any other site's windows, thereby monopolizing the browser.

4.JavaScript cannot read information from an open Web page from another server. In other words, the Web page cannot read information from other windows that are already open, so it is not possible to probe which sites surfers are still accessing.

What is Ajax?

Ajax is a way to create interactive Web applications. AJAX is the acronym for Asynchronous JavaScript and XML (asynchronous JavaScript and XML), coined by web developer Jesse JameS Garrett in early 2005. Strictly speaking, Ajax is only a small part of JavaScript (though this is particularly prevalent). However, with frequent use, the word no longer refers to a technology itself (such as Java or JavaScript).

In most cases, Ajax typically refers to a combination of these technologies:

xmtml;

CSS (cascading style Sheet, cascading style sheet);

Dom accessed using JavaScript (Document Object model;

XML, which is the data format transmitted between the server and the client;

XMLHttpRequest, which is used to get data from the server.

The benefits of Ajax are:

Most of the processing of an application occurs in the user's browser, and data requests to the server are often very short. So you can use Ajax to build rich applications that rely on web-based data, but have far more performance than old fashioned methods that require the server to return the entire HTML page to respond to user actions.

Some companies have invested heavily in Ajax, especially Google. Google has built several well-known Ajax apps, including Gmail (web-based e-mail), Google Calendar,google docs and Google MapS. Another large Ajax supporter, Yahoo! , it uses Ajax to enhance personalized my Yahoo portal, Yahoo home, Yahoo Mail, and so on. The two companies have opened up their Web application interfaces to the public, and people can use them to get maps and add interesting, useful or playful information to the map, such as the location of all Japanese restaurants in the Los Angeles area or the location of the film's launch.

1. JavaScript

Defined:

The shorthand for JavaScript is JS, a scripting language developed by Netscape, a scripting language that is widely used in client Web development, and is often used to add dynamic functionality to HTML pages (programs that are written can be embedded in HTML or XML pages, and interprets the execution directly in the browser.

Part:

The core (ECMAScript), Document Object Model (the documents objects models, short DOM), browser object model (Browser object models, short BOM)

Describe:

JavaScript is a new programming language that is adapted to the needs of dynamic web-making, and is now increasingly used in Internet web page production.

JavaScript is a scripting language developed by Netscape (scripting language), or a descriptive language. On the basis of HTML, you can use JavaScript to develop interactive Web pages.

The advent of JavaScript enables a real-time, dynamic, interactive relationship between Web pages and users, which includes more active elements and more exciting content.

JavaScript is short and is executed on the client, which greatly improves the browsing speed and interactive ability of the Web page. It is also a simple programming language tailored for making Web pages.

The mainstream JavaScript framework is: YUI, dojo,prototype,jquery ...

2, Ajax

Defined:

Ajax is "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), AJAX is not an acronym, but a noun created by Jesse James Gaiiett, a Web development technology that creates interactive Web applications.

Ajax is not a technology, it is actually several technologies, each of which has its own unique, combined to become a powerful new technology.

Composition

Representation based on XHTML and CSS standards;

Use the document Object model for dynamic display and interaction;

Use XML and XSLT to do data interaction and manipulation;

Asynchronous communication with the server using XML HttpRequest;

Use JavaScript to bind everything.

Describe:

Ajax is a combination of Java technology, XML and JavaScript, and other programming technologies that allow developers to build Web applications based on Java technology, and break the use of page overload management.

Ajax technology uses asynchronous HTTP requests to pass data between browser and the Web server so that browser updates only part of the page content without loading the entire page.

Ajax is a Web application development method that uses client script to exchange data with a Web server. This way, Web pages can be updated dynamically without interrupting the interactive process. With Ajax, users can create a direct, highly available, richer, more dynamic Web user interface that is close to local desktop applications.

3, JQuery

Defined:

jquery is a fast, concise JavaScript library that makes it easier for users to handle HTML documents, events, animations, and easily provide Ajax interaction for the site.

Characteristics:

Lightweight, chain syntax, css1-3 selector, Cross-browser, simple, easy to expand;

jquery is a framework that is independent of server-side code, independent of ASP.net or Java;

jquery is a very popular JavaScript framework, using a CSS-like selector, you can easily manipulate HTML elements, have a good scalability, have a lot of plug-ins.

Describe:

For programmers, simplifying JavaScript and Ajax programming can help programmers get out of the design and writing complex JS applications, shift focus to functional requirements rather than implementation details, and thus increase project development speed.

For users, improve the visual effects of the page, enhance the interaction with the page, experience more gorgeous web page materials.

The JavaScript framework is actually a series of tools and functions.

The relationship between the two and the three

Let me illustrate the relationship between the three by using a guide chart:


Explain:

JavaScript is the scripting language for Web client development, Ajax is based on the JS language, the main combination of JS, CSS, XML three technologies, is used to create interactive Web page application Web development technology. jquery is the framework of JS, based on the JS language, set AJAX technology developed by the JS Library, encapsulating JS and AJAX functions, providing function interface, greatly simplifies the operation of the AJAX,JS.

Simple summary:

1, JS is a front-end language.

2, Ajax is a technology, it provides an asynchronous update mechanism, the use of client and server Exchange data rather than the entire page document, to achieve a local update of the page.

3. jquery is a framework that encapsulates JS to make it easier to use. jquery makes JS and Ajax easier to use

Detailed information:

Actually only one of the them is a programming language.
Javascript is a programming language which is used mainly to webpages for making websites. When a webpage was parsed by the browser, it creates a in-memory representation of the page. It is a tree structure, which contains all elements on the page. So there are a root element, which contains the head and the body elements, which contain other elements, which contain oth ER elements. So it looks like a tree basically. Now with JavaScript, can manipulate elements in the page using this tree. Can pick elements by their ID (GetElementsById), or their tag name (getElementsByTagName), or by simply going The tree (parentnode, FirstChild, LastChild, nextSibling, previoussibling, etc.). Once you have element (s) to work with your can modify them by changing their, content or position on the page. This interface is also known as the DOM (Document Object Model). So can do everything with Javascript this another programming language can do, and by using it embeddedInto wepages your also get a in-memory Object of the current webpage by which you can make changes to the page interactive Ly.
AJAX is a technique of communication between the browser and the server within a page. Chat is a good example. In the write a message, send a and recive the messages without leaving the page. You can manage this interaction with Javascript on the client side, using a XMLHTTP Object provided by the browser.
The JQuery is a library which aims for simplify client side web development in general (the two other above). It creates a layer of abstracion so can reuse common languages like CSS and HTML in Javascript. It also includes functions which can be used to communicate with servers very (AJAX). It is written in Javascript, and won't does everything for you, only makes common tasks easier. It also hides some of the misconceptions and bugs of browsers.
To sum up:
Javascript is a programming language (objects, array, numbers, strings, calculations)
AJAX and JQuery uses Javascript
The jQuery is for simplifing common tasks with AJAX and page manipulation (style, animation, etc.)
Finally, an example just to the some syntax:
Page manipulation in JavaScript
var el = document.getElementById ("box");
El.style.backgroundColor = "#000";
var new_el = document.createelement ("div");
el.innerhtml = "<p>some content</p>";
El.appendchild (New_el);
And how to would do it in JQuery
$ ("#box")
. css ({"Background-color": "#000"})
. Append ("<div><p>some content</p></div>");

1.javascript is a scripting language that executes on the client. Ajax is a technology based on JavaScript, and its main purpose is to provide asynchronous refreshes (only part of the page is refreshed, not the entire page is refreshed). One is language, the other is technology, and there is an essential difference between them.

2.javascript is a scripting language executed on the browser side, Ajax is a development technique for creating interactive Web applications that utilizes a range of related technologies including JavaScript.

3.
What can JavaScript do?

There are a lot of things you can do with JavaScript to make your pages more interactive and provide a better, more exciting experience for your site's users. JavaScript allows you to create an active user interface that gives feedback to users as they navigate between pages.

Use JavaScript to ensure that users enter valid information in a form, which can save you business time and expense.

Using JavaScript, you can create custom HTML pages based on user actions.

JavaScript can also work with forms, set cookies, instantly build HTML pages, and create web-based applications.

What can't javascript do?

JavaScript is a client language. (In fact, there are also JavaScript versions of server-side implementations). In other words, it is designed to perform tasks on the user's machine, not on the server. As a result, JavaScript has some inherent limitations, which are mainly for the following security reasons:
1.JavaScript is not allowed to read and write files on client machines. This is good because you don't want the Web page to read the files on your hard disk, or to write the virus to a hard disk, or to manipulate files on your computer. The only exception is that JavaScript can be written to the browser's cookie file, but there are some limitations.
2.JavaScript is not allowed to write files on the server machine. Although the files on the write server are convenient in many ways (such as storing page clicks or data that the user fills out the form), JavaScript does not allow this. Instead, you need to use a program on the server to process and store the data. This program can be a program or Java program written in a language like Perl or PHP that runs on a server.

3.JavaScript cannot close a window that is not opened by itself. This is to prevent a site from shutting down any other site's windows, thereby monopolizing the browser.

4.JavaScript cannot read information from an open Web page from another server. In other words, the Web page cannot read information from other windows that are already open, so it is not possible to probe which sites surfers are still accessing.

What is Ajax?

Ajax is a way to create interactive Web applications. AJAX is the acronym for Asynchronous JavaScript and XML (asynchronous JavaScript and XML), coined by web developer Jesse JameS Garrett in early 2005. Strictly speaking, Ajax is only a small part of JavaScript (though this is particularly prevalent). However, with frequent use, the word no longer refers to a technology itself (such as Java or JavaScript).
In most cases, Ajax typically refers to a combination of these technologies:

xmtml;

CSS (cascading style Sheet, cascading style sheet);

Dom accessed using JavaScript (Document Object model;

XML, which is the data format transmitted between the server and the client;

XMLHttpRequest, which is used to get data from the server.

The benefits of Ajax are:

Most of the processing of an application occurs in the user's browser, and data requests to the server are often very short. So you can use Ajax to build rich applications that rely on web-based data, but have far more performance than old fashioned methods that require the server to return the entire HTML page to respond to user actions.
Some companies have invested heavily in Ajax, especially Google. Google has built several well-known Ajax apps, including Gmail (web-based e-mail), Google Calendar,google docs and Google MapS. Another large Ajax supporter, Yahoo! , it uses Ajax to enhance personalized my Yahoo portal, Yahoo home, Yahoo Mail, and so on. The two companies have opened up their Web application interfaces to the public, and people can use them to get maps and add interesting, useful or playful information to the map, such as the location of all Japanese restaurants in the Los Angeles area or the location of the film's launch.

1. JavaScript

Defined:

The shorthand for JavaScript is JS, a scripting language developed by Netscape, a scripting language that is widely used in client Web development, and is often used to add dynamic functionality to HTML pages (programs that are written can be embedded in HTML or XML pages, and interprets the execution directly in the browser.

Part:

The core (ECMAScript), Document Object Model (the documents objects models, short DOM), browser object model (Browser object models, short BOM)

Describe:

JavaScript is a new programming language that is adapted to the needs of dynamic web-making, and is now increasingly used in Internet web page production.

JavaScript is a scripting language developed by Netscape (scripting language), or a descriptive language. On the basis of HTML, you can use JavaScript to develop interactive Web pages.

The advent of JavaScript enables a real-time, dynamic, interactive relationship between Web pages and users, which includes more active elements and more exciting content.

JavaScript is short and is executed on the client, which greatly improves the browsing speed and interactive ability of the Web page. It is also a simple programming language tailored for making Web pages.

The mainstream JavaScript framework is: YUI, dojo,prototype,jquery ...

2, Ajax

Defined:

Ajax is "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), AJAX is not an acronym, but a noun created by Jesse James Gaiiett, a Web development technology that creates interactive Web applications.

Ajax is not a technology, it is actually several technologies, each of which has its own unique, combined to become a powerful new technology.

Composition

Representation based on XHTML and CSS standards;

Use the document Object model for dynamic display and interaction;

Use XML and XSLT to do data interaction and manipulation;

Asynchronous communication with the server using XML HttpRequest;

Use JavaScript to bind everything.

Describe:

Ajax is a combination of Java technology, XML and JavaScript, and other programming technologies that allow developers to build Web applications based on Java technology, and break the use of page overload management.

Ajax technology uses asynchronous HTTP requests to pass data between browser and the Web server so that browser updates only part of the page content without loading the entire page.

Ajax is a Web application development method that uses client script to exchange data with a Web server. This way, Web pages can be updated dynamically without interrupting the interactive process. With Ajax, users can create a direct, highly available, richer, more dynamic Web user interface that is close to local desktop applications.

3, JQuery

Defined:

jquery is a fast, concise JavaScript library that makes it easier for users to handle HTML documents, events, animations, and easily provide Ajax interaction for the site.

Characteristics:

Lightweight, chain syntax, css1-3 selector, Cross-browser, simple, easy to expand;

jquery is a framework that is independent of server-side code, independent of ASP.net or Java;

jquery is a very popular JavaScript framework, using a CSS-like selector, you can easily manipulate HTML elements, have a good scalability, have a lot of plug-ins.

Describe:

For programmers, simplifying JavaScript and Ajax programming can help programmers get out of the design and writing complex JS applications, shift focus to functional requirements rather than implementation details, and thus increase project development speed.

For users, improve the visual effects of the page, enhance the interaction with the page, experience more gorgeous web page materials.

The JavaScript framework is actually a series of tools and functions.

The relationship between the two and the three

Let me illustrate the relationship between the three by using a guide chart:

Explain:

JavaScript is the scripting language for Web client development, Ajax is based on the JS language, the main combination of JS, CSS, XML three technologies, is used to create interactive Web page application Web development technology. jquery is the framework of JS, based on the JS language, set AJAX technology developed by the JS Library, encapsulating JS and AJAX functions, providing function interface, greatly simplifies the operation of the AJAX,JS.

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.