Tag:Ajax request

  • The solution of IE sending Ajax request to return the last result

    Time:2021-6-17

    Causes of the problem: 1. Only one Ajax request will be created under ie, and the response result will be put in the browser cache, which will be read from the cache the next time the Ajax request is called In get mode, because the sending parameters and address are consistent, ie will get the […]

  • HTML + JS + PHP an original Ajax request example

    Time:2021-6-14

    Today, I’d like to show you the original Ajax request process. Although the Ajax of jQuery is much easier than the original writing method, we should still understand the original writing method. Next, I’ll divide it into three small files: HTML, JS and PHP to show. The database will write by itself. First, HTML Copy […]

  • Herf = # results in no data being sent to the background when Ajax requests

    Time:2021-6-3

    Today, I’m doing the right-click menu. When I click rename for Ajax request, I don’t send data to the background, but jump to the home page directly. I couldn’t understand it. Later, I found a problem on the front page: Copy codeThe code is as follows: <span style=”font- size:24px; “>< Li > < a (?) […]

  • The difference between Ajax request post and get and the choice of get post

    Time:2021-5-6

    The simplest difference: 1. When using get request, the parameters will be displayed in the URL, but not in the post mode 2. Using get request to send small amount of data, post request to send large amount of data 3. Get requests need to pay attention to caching, post requests need not worry about […]

  • An example discussion on the return sequence of multiple Ajax requests

    Time:2021-5-1

    Sometimes in a business event processing process, you may encounter an action triggered by clicking a button or other events You need to execute more than two Ajax requests, but you may have to consider the sequence of Ajax requests. Sometimes, problems in the sequence of Ajax requests will lead to various problems For example, […]

  • Open a new window after successful Ajax request window.open () solution to interception

    Time:2021-4-18

    Question: The previous development project encountered a problem, AJAX asynchronous request after the success of the need to open a new window to open the URL, using the window.open () method, but unfortunately it was intercepted by the browser. How to solve this problem?analysis: The reason why the browser intercepts a new window is that […]

  • Ajax request to add custom header parameter code

    Time:2021-3-19

    I don’t want to talk much nonsense. Let’s look at the code directly~ $.ajax({ type: “post”, url:”http://127.0.0.1:4564/bsky-app/template/testPost”, contentType: “application/json;charset=utf-8”, data :JSON.stringify({“bodyName”:”sdfsdf”,”date”:”2017-11-28 07:34:01″,”price”: 10.5,”tbId”: 1}), dataType: “json”, beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader(“token”, “eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxOD…..”); }, success: function (data) { alert(data); },error:function(error){ console.log(error); } }); beforeSend: function (XMLHttpRequest) { XMLHttpRequest.setRequestHeader(“token”, “eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxOD…..”); }, Among them, token is the header […]

  • A simple implementation of Ajax to show the progress in the process of request

    Time:2021-1-18

    AJAX is used more and more frequently in web applications. In the process of calling Ajax, we usually have this method: display a GIF image animation to show that the background is working, and prevent the user from operating this page (for example, AJAX request is triggered by a button, and the user cannot frequently […]

  • JS and jQuery methods to terminate the sending Ajax request

    Time:2020-11-7

    This article describes how JS and jQuery terminate the Ajax request that is being sent. For your reference, the details are as follows: Core: call the abort method on the XMLHttpRequest object The Ajax method of jQuery has its own timeout setting parameters: $.ajax({type:’POST’, url:’b.php’, data:”, timeout:5000, success:function(){ } }) meanwhile 1. The data type […]

  • Analysis of the sequence of returned data in Ajax request

    Time:2020-10-26

    This paper analyzes the order of the returned data of Ajax request. For your reference, the details are as follows: After Ajax requests a URL, the array is in the following format after PHP back-end processing: Copy codeThe code is as follows: $a = array( ‘-1’=> 10 ,’-3′ => 2, ‘0’ => ‘5’ ,’-2′ => […]

  • Ajax request in progress async:false/true Analysis of the role of

    Time:2020-9-3

    In this paper, an example of Ajax request is analyzed async:false/true The role of. For your reference, the details are as follows: test.html code: <a href=”javascript:void(0)” onmouseover=”testAsync()”> asy.js code: function testAsync(){ var temp; $.ajax({ async: false, type : “GET”, url : ‘tet.php’, complete: function(msg){ alert(‘complete’); }, success : function(data) { alert(‘success’); temp=data; } }); alert(temp+’ […]

  • On Ajax request Technology

    Time:2020-5-29

    1. Write in the front: Reading requirements: It has certain HTML, CSS, JavaScript and JSON basis 2. What is Ajax Ajax: asynchronous JavaScript and XML (asynchronous JavaScript and XML), refers to a web development technology to create interactive web applications. 3. Why to use ajax In the dynamic web page development technology, the data interaction […]