重复使用单个 XMLHttpRequest 下载多个文件

问题描述 投票:0回答:0

您好,下面的 XMLHttpRequest 实现,单个请求会下载多个重复文件。有什么办法可以避免这种情况吗?

var location = abc+ "/tasksample/"; var xhr = new XMLHttpRequest(); window.location.assign(location ); xhr.open("GET", location , true); xhr.send();

javascript browser download xmlhttprequest
© www.soinside.com 2019 - 2024. All rights reserved.