javascript - 如何在 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()”发送请求时,如何获取该特定请求的源端口
解决方案
推荐阅读
- java - 将数组插入 Map 时出现 UnsupportedOperationException
- javascript - 带有 React Bootstrap 的 TypeScript 可重用表单
- ios - 在 swiftUI 中的导航视图上显示视图
- java - 前台String类型的时间字符串是否异常传输到后台?
- java - selenium 脚本检查姓氏文本框的占位符值
- javascript - 如何过滤网站中json中的对象
- java - 数组的逆序线性搜索算法
- cybersource - Cybersource 通过 Java SDK 创建客户支付工具;"message":"无效的正文值","details":[{"name":"type","location":"card"}]}
- javascript - 使用或映射状态变量时无法在组件中渲染组件图像
- spring - Spring Test:在测试中创建几个类