我想做XMLHttpRequest然后通过POST方法发送文件名在浏览器中打开PDF.
xmlhttp.open("POST","pdf.php",true); //CHANGE
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("file="+input);
Run Code Online (Sandbox Code Playgroud)
这是可能的还是XMLHttpRequest只适用于HTML?