In JavaScript, how do I pass a variable's state at the time of an XMLHttpRequest and the response of the request to the same function?

前端 未结 0 1321
梦谈多话
梦谈多话 2020-12-05 12:30

I have code like this:

for (var i = 0; i < 10; i++) {
    var oReq = new XMLHttpRequest();
    oReq.addEventListener("load", loaded(i));
    oReq         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题