Javaee--ajax

Source: Internet
Author: User

Statement: The material used in this column is written by the VIP students of the Kay Academy, who has the right to be anonymous and has the final right to interpret the article; The Edith Academy is designed to promote students to learn from each other on the basis of public notes.

Ajax Introduction

Ajax Asynchronous JavaScript and XML (asynchronous JavaScript and XML) refers to a web development technique that creates an interactive Web application.

Ajax = Asynchronous JavaScript and XML (a subset of standard generic markup languages).

Ajax is a technique for creating fast, Dynamic Web pages.

Ajax is a technique that can update parts of a Web page without reloading the entire page.

Ajax enables Web pages to be updated asynchronously by exchanging small amounts of data in the background with the server. This means that you can update a part of a webpage without reloading the entire page.

Traditional Web pages (without Ajax) if you need to update the content, you must reload the entire page page.

Called Local brush technology

Application Scope of Ajax

Such as Baidu search box search keywords

Principle:

A search box input keyword will call the JavaScript program immediately call the AJAX request Baidu Server, will reflect the Java Advanced Program what then the server will present the content to Ajax and then to the JavaScript finally back to the Div, and then the information presented, That's when the Web page shows up.

To achieve a step:

1 Creating a XMLHttpRequest Object

2 parameters inside the open method of an XML object

Xmlhttp.open ();

3 Send Start Access server has parameters for post requests

4 Data Feedback

setRequestHeader () Setting the request header information

onReadyStateChange () The state of the request changes, that is, an event informs you from the beginning to the end.

ReadyState () State read returns whether the network channel is normal

Status () Response feedback the server side has no problem with the results and channels of this visit's web page,

Get text information

ResponseText ()

Responsexml ()

Example Send SMS

Javaee--ajax

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.