Request methods, including GET and POST:GET The most common HTTP request is GET. The GET request directly follows the URL and starts with a question mark. (Window. location. search is used in JS ). The parameters can be encoded using
The code for sending a request through XMLHttpRequest in JavaScript. For more information, see. The XMLHttpRequest object is divided into four parts:
1. Create an XMLHttpRequest component
2. Set the callback function
3. initialize XMLHttpRequest
1, the background of Ajax technologyAdmittedly, the popularity of Ajax technology benefits from Google's strong promotion, it is because of Google Earth, Google suggest and Gmail, and other Ajax technology widely used, the emergence of the
I saw a JavaScript question (setTimeout) from QLeelulu tonight. I thought about it a little bit. It was hard to guess it and I happened to say the correct answer. But why? I am not quite clear at the moment. I feel like it is caused by an endless
Google AutoComplete is created in ten minutes. Because it is created in ten minutes, only the surface effect is taken into consideration. All others are ignored. . Conventional discussion --- XmlHttpRequest
Code
The Code is as follows:
Var
In the morning, I did some tests. When I got the page to Firefox, there were a bunch of problems. The page layout was not mentioned. The Javascript code problem was a headache, for example:
1. document. all () does not work in FF. It must be changed
Xmlhttp pool code written in javascript. The following method is called: var Pool_xmlreq = function (){
Var _ cacheCase = [];
_ CacheCase. fetch = function (){
Var I = 0;
Var _ instance = function (){
Try {
Return (new ActiveXObject ("Msxml2.XMLHTTP.
Lib. js used in the filemanage function? 1.1.23 var indexnum = 10;
Var count = 0;
Function getmap (sFileName, sId ){
Var Uploadpic = "../filetype/unknown.gif ";
Var sExten = sFileName. substring (sFileName. lastIndexOf (".") + 1, sFileName.
Learning Ajax from Ajax to JQueryAjax
XMLDocument and XMLHttpRequest objects
1. Create an XMLHttpRequest request object
The Code is as follows:
Function getXMLHttpRequest (){Var xRequest = null;If (window. XMLHttpRequest ){XRequest = new
Several nice functions in js $ ()
The Code is as follows:
Function map (a, f) {f ();}Function getRand (a, B){If (){B = B? B: 0;Return Math. floor (Math. random () * a + B );} Else{A = new Date ();Return d. getTime ();}}Function $ (a) {document.
I have been pondering javascript For the past few days, but I have never had any practical experience. Now I think there are a lot of practical errors. I will continue to summarize the errors in the future. The key is to reduce the debugging time,
How can I use javascript to determine whether the requested url/link is valid (connectable and available )?
Introduction
There is an address book system deployed on several servers at the same time, but there is a Address Book link on the home page
In daily webpage design, tables are one of the most commonly used html controls. For convenience and beauty, Easy appears. grid, this table is Easy to use, and the symbol is Easy.
Users only need to use html and Javascript, and read the Demo of Easy.
TimeOut and event processing problems of jQuery and ExtJS, jqueryextjs
For jQuery, you can directly set the timeout parameter for timeout and capture the second parameter in the error event. If it is a "timeout", it indicates that the timeout event
Supports Form-based non-transient submission (the method is a bit stupid)Supports the MVC framework.Multi-thread concurrent requests (to support threads in languages)Dynamic file loading, only useful! Handles the problem of bloated JS files in the
Sometimes, your Blog may need the following features:Aggregates and displays the latest Blog articles on your own Blog, so that you can learn about your friends in a timely manner. In addition, it is also convenient for visitors to find Blog and
Ajax. js------------------------- [Ajax class] --------------------------Copy codeThe Code is as follows:Function Ajax (recvType ){Var aj = new Object ();Aj. recvType = recvType? RecvType. toUpperCase (): 'html'; // file type passed to the
Sometimes we need ajax to process json data returned by php, which is suitable for users who often use php for development. For those who need it, refer to test.html.
The Code is as follows:
Click Function ajax_init (){Var ajax = false;Try {Ajax =
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.