As3 FileReference下載動態url不發送變量數據; 樣品:As3 FileReference下載動態url
downloadXls.buttonMode=true;
import flash.net.FileReference;
import flash.events.Event;
var localRef:FileReference;
var fileRequest:URLRequest= new URLRequest("http://[sitename].com/xlsexport.php?id=456");
downloadXls.addEventListener(MouseEvent.CLICK,downloadXlsH);
function downloadXlsH(event:MouseEvent):void{
localRef = new FileReference();
localRef.addEventListener(Event.COMPLETE, completeHandler);
localRef.download(fileRequest, 'myfile.xls');
}
function completeHandler(e:Event):void{
trace('OK. Dosya Kaydedildi.');
}
問題:HTTP:// [網站名稱]的.com/xls.php ID = 456 id變量不發送xlsexport.php
代碼僅僅是 「文件名= xlsexport」 變量產生我想發送一個不同的變量「id = 4545 & pass = 87665」
不工作。 localRef.download(fileRequest,'myfile.xls'); fileRequest不發送變量 –