我想做XMLHttpRequest,然後通過POST方法發送文件名在瀏覽器中打開PDF。XMLHttpRequest在瀏覽器中打開PDF
xmlhttp.open("POST","pdf.php",true); //CHANGE
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("file="+input);
那是可能的,或者XMLHttpRequest是隻爲HTML?
你試圖動態加載使用Javascript的PDF? – Jonah 2011-01-20 17:45:05
是的!也許這將有所幫助:http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit – user583311 2011-01-20 17:46:18