Tag:xmlhttprequest

  • Generation example of XMLHttpRequest object in AJAX in different browsers

    Time:2021-9-4

    Copy codeThe code is as follows: <script type=”text/javascript”> function ajax() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject(“Msxml2.XMLHTTP”); } catch (e) { Alert (“your browser does not support Ajax!”);return false; } } } </script>

  • Analyze the compatibility between the creation of Ajax core XMLHttpRequest object and browser

    Time:2021-7-28

    Mlhttprequest object is the core of Ajax function. To develop Ajax programs, we must start with understanding XMLHttpRequest object. To understand the XMLHttpRequest object, start by creating the XMLHttpRequest object. Create the XMLHttpRequest object in different browsers using different methods: Let’s first look at IE’s method for creating XMLHttpRequest object (method 1):  var xmlhttp=ActiveXobject(“Msxml12.XMLHTTP”);// Create […]

  • JSP XMLHttpRequest dynamic no refresh and its Chinese garbled processing

    Time:2021-6-18

    1. Add the//Xmlhttp request without refresh requestvar http_request=false; function createRequest(url) { http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,… http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType(‘text/html’); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject(“Msxml2.XMLHTTP”); } catch (e) { try { http_request = new ActiveXObject(“Microsoft.XMLHTTP”); } catch (e) […]

  • Summary of Ajax core XMLHttpRequest

    Time:2021-3-6

    Ajax: namely “asynchronous JavaScript and XML” (asynchronous JavaScript and XML), a comprehensive technology: using JavaScript object XMLHttpRequest for asynchronous data exchange; JavaScript operating DOM to achieve dynamic effects; using XHTML + CSS to express information; XML and XSLT operating data. This article focuses on using XMLHttpRequest object to exchange asynchronous data with server. usage methodFive […]

  • XMLHttpRequest (Ajax) cannot modify cookies in the header

    Time:2020-1-29

    When debugging the interface, I found that how jQuery Ajax modifies the cookies of headers does not work, so I got the answer There are also some items that cannot be modified. The following is an array of items that cannot be modified var forbiddenRequestHeaders = [ “accept-charset”, “accept-encoding”, “access-control-request-headers”, “access-control-request-method”, “connection”, “content-length”, “content-transfer-encoding”, “cookie”, […]

  • XMLHttpRequest FormData

    Time:2020-1-22

    What is FormData MDN XMLHttpRequest Level 2 adds support for the new FormData interface. FormData objects provide a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest send() method. XMLHttpRequestThe second edition added a new interfaceFormDataSupport.FormDataYou can easily pair form […]

  • Do you really use XMLHttpRequest?

    Time:2020-1-1

    When seeing the title, some students may think: “I have usedxhrSuccessfully sent manyAjaxI’ve asked. I’m quite proficient in its basic operation. ” I used to think like you, until recently I usedxhrWhen I stepped on many holes, I suddenly found that I didn’t know enough about itxhrI know only the most basic use.So I decided […]

  • Choose an Ajax / HTTP Library

    Time:2019-12-29

    Using JavaScript for development can never get around the network. At present, the main network use scenarios are as follows: AJAX (browser) HTTP client (server) Of course, if you are developing an isomorphic / universal application, you may need something that can handle both the browser and the server side. Anyway, use it directlyXMLHttpRequestIt’s very […]

  • Front end training – intermediate stage (10) – homologous strategy (August 15, 2019)

    Time:2019-12-3

    The most basic part of the front end isHTML+CSS+Javascript。 Mastering these three technologies, even if you are a beginner, is just a beginner. Now the definition of front-end development is far more than these. Front end classroom(HTML/CSS/JS)In line with the central idea of improving the technical level and strengthening the basic knowledge, we have started […]

  • XMLHttpRequest properties, methods, events & more.

    Time:2019-11-28

    XMLHttpRequest property, method and event collation. Method of XHR object open(method:string, url:string, async?:boolean=true, username?:string, password: string) Used to createHTTPRequest, but the request was not sent. method, request type, such asGET 、POSTWait, case insensitive. url, URLaddress async, asynchronous or not, defaulttrue。In case of synchronization request xhr.timeoutValue must be 0. xhr.withCredentialsValue must be false. xhr.responseTypeThe value must […]

  • Front end training – intermediate stage (21) – xhr2, formdata (2019-10-17)

    Time:2019-11-16

    The most basic part of the front end isHTML+CSS+Javascript。 Mastering these three technologies, even if you are a beginner, is just a beginner. Now the definition of front-end development is far more than these. Front end classroom(HTML/CSS/JS)In line with the central idea of improving the technical level and strengthening the basic knowledge, we have started […]