首页 > 解决方案 > 如何在 javascript 中获取 XMLHttpRequest 的源端口并将其放入变量中?

问题描述

xhr= new XMLHttpRequest(); //creates a new XMLHttpRequest
xhr.open("GET", "file.txt", false);
xhr.send(); // the request is sent
responsee = (xhr.responseText); // and the response is received

当使用“xhr.send()”发送请求时,如何获取该特定请求的源端口

标签: javascript

解决方案


推荐阅读