• Ajax request nested Ajax request sample code


    Some time ago, when I was working on a project, I needed to integrate two XML files of provinces and cities in China into one JSON format data. When I wrote it by hand, I felt that there was too much data and it was easy to make mistakes. So I thought of using Ajax […]

  • Ajax validates the database content and displays the value on the page


    Function realization: Fill in the content of the text box in the JSP page, leave the cursor from the text box, and get other data corresponding to the changed value in the database in the corresponding place of this page. servlet: request.setCharacterEncoding(“utf-8”); PrintWriter out = response.getWriter(); //Call the servlet layer to search the database for […]

  • Solution to the cache problem of Ajax unable to refresh data under IE9


    Use getjson of jQuery to get data from the background regularly and refresh the interface. When using the following methods, it’s OK in chrome and Firefox, but it can’t refresh the data in IE9 $.getJSON(webApp + “/GetShowData.do?limit=” + limit,function(data){   //****************** } The reason is that in IE9, if the Ajax request is the same as […]

  • Ajax post form submission setRequest header error solution


    When we create an asynchronous object XMLHttpRequest and transfer data to the background in post mode. We need to set the xhr.setRequestHeader The value of the member is XMLHttpRequest.setRequestHeader (“content type”, “application / x-www-form-urlencoded”); otherwise, the background cannot receive the passed value. Because it is shown in the compiler of Google browser that the value […]

  • Using Ajax and history.pushState No refresh change page URL example


    performance If you use chrome or firebox to visit this blog github.com 、 plus.google.com When waiting for the website, careful you will find that the clicks between pages are asynchronous requests through Ajax, and the URL of the page has changed. And can very good support browser forward and backward. What has such a powerful […]

  • Feasible solutions to Ajax cross domain problems under IE9


    Ajax cross domain request data in Google, foxes, my local ie11 is no problem. Let the test find the problem, IE8 request data, and then I look at their own written JS to see if there is any incompatibility problem, but no ah, why not request it. I print out the error of Ajax and […]

  • Compatible multi browser Ajax request instance implemented by JS and jquery


    AJAX is often used by us, but most of the Ajax found on the Internet are not very compatible. Let’s change a good Ajax function with strong compatibility. At the same time, the jQuery Ajax introduced later is also very compatible. 1、 Ajax instance of pure JS implementation: Copy codeThe code is as follows: var […]

  • Ajax access to data Chinese garbled the simplest perfect solution


    The problem can be solved by using scriptcharset, but not by using contenttype. Copy codeThe code is as follows: $.ajax({       url: testUrl,       dataType: ‘jsonp’,       type: ‘post’,       scriptCharset: ‘utf-8’     }); The above solution is the most perfect. In addition, the online solution is also attached. It is handled with contenttype Copy […]

  • Three points on the principle of Ajax technology


    Ajax: asynchronous JavaScript and XML, asynchronous JavaScript and XML. It is a web development technology to create interactive web applications. 1.0 advantages:1.1 improve the user experience through asynchronous mode.1.2 optimizes the transmission between browser and server, reduces unnecessary data round-trip and bandwidth consumption.1.3 Ajax engine runs on the client side and takes on a part […]

  • Ajax encapsulation class guide


    AJAX is very difficult to say, but if you encapsulate it, you will find that it is very easy to use, of course, it is also a simple application, such as the application of message board. First of all, let’s give you a gift, that is, the encapsulated Ajax class and the download addresshttp://xiazai.jb51.net/201412/yuanma/ajax3.0(jb51.net).rarHere to […]

  • Getting blog list of Ajax elementary course


    When I wrote this demo, I originally wanted to directly visit the RSS of Xiaocai blog, but this is obviously cross domain access and is not allowed. Therefore, Xiaocai saves the blog RSS locally, which is an XML format file. It directly requests the local XML file with Ajax. ThroughThis example shows the following techniques: […]

  • Interaction between browser and server in AJAX


    Before we get to know Ajax, let’s take a look at how the browser interacts with the server 1. The browser sends the request to the server 2. The server receives the request information and returns different information to the browser according to different situations 3. The browser receives the information and outputs it to […]