Home >Web Front-end >JS Tutorial >Source code courseware of Chuanzhi Podcast AJAX video tutorial

Source code courseware of Chuanzhi Podcast AJAX video tutorial

黄舟
黄舟Original
2017-12-04 11:26:351898browse

AJAX stands for "Asynchronous Javascript And XML" (asynchronous JavaScript and XML), which refers to a web development technology for creating interactive web applications. "Chuanzhi Podcast AJAX Video Tutorial" explains the related technologies of AJAX.

Source code courseware of Chuanzhi Podcast AJAX video tutorial

Course playback address: http://www.php.cn/course/565.html

The teacher’s teaching style:

The teacher’s lectures are simple, clear, layer-by-layer analysis, interlocking, rigorous argumentation, rigorous structure, and use the logical power of thinking to attract students’ attention Strength, use reason to control the classroom teaching process. By listening to the teacher's lectures, students not only learn knowledge, but also receive thinking training, and are also influenced and influenced by the teacher's rigorous academic attitude

The more difficult part in this video is the use of XHR objects to send and receive Data:

XMLHttpRequest is the object of the XMLHttp component. Through this object, Ajax can only exchange the data layer with the server like a desktop application, without having to refresh the interface every time, and does not have to refresh the interface every time. For the first time, all the data processing work is handed over to the server; this not only reduces the load on the server, but also improves the response speed and shortens the user's waiting time.
XMLHttpRequest object and Ajax
In Ajax applications, the XMLHttpRequest object is responsible for sending user information to the server in asynchronous communication and receiving server response information and data.
It should be noted that JavaScript itself does not have the ability to send requests to the server. Either use the window.open() method to reopen a page, or use the XMLHttpRequest object to send a request. The difference is that the former is an ordinary, synchronous interaction. mode, while the latter is an asynchronous interaction mode.
The properties and methods of the XMLHttpRequest object.
Starting from IE5.0, developers can use XMLHTTP ActiveX components inside WEB pages to extend their own functions, while Mozilla1.0 and NetScape7 create proxy classes XMLHttpRequest that inherit XML; in most cases, XMLHttpRequest and XMLHttp components are very similar. , methods are similar to attributes, but some attributes are different. The following code demonstrates how to create an XMLHttpRequest object in browsers such as IE and NetScape.

<script language="javascript">
        //定义一个变量
        var http_request = false;
        //IE浏览器中创建
        http_request = new ActiveXObject("Msxml2.XMLHTTP");//新版本IE
        http_request = new ActiveXObject("Microsoft.XMLHTTP");//旧版本IE
        //Netscope浏览器
        http_request = new XMLHttpRequest();
    </script>

It should be noted that XMLHttpRequest is also supported in Microsoft's latest IE7.0 browser, which means that IE7.0 supports both the above two creation methods. When we develop AJAX applications, we must pay attention to compatible browser types.

Here we also recommend downloading the information: http://www.php.cn/xiazai/learn/1805

1.AjaxTrain (source code)

2.JqueryTrain (source code)

The above is the detailed content of Source code courseware of Chuanzhi Podcast AJAX video tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn