我尝试使用Flash AS3连接到使用dopostback方法但不知道如何操作的页面 如果有人有任何想法 我试过这个但没有任何作用:
import flash.display.Loader;
import flash.net.URLRequest;
import flash.net.URLVariables;
stop()
c3.buttonMode = true
c3.addEventListener(MouseEvent.CLICK,clc)
//******
var web : String = 'https://services.just.edu.jo/courseschedual/index.aspx'
var loader : URLLoader =new URLLoader()
var urlr : URLRequest = new URLRequest(web)
loader.addEventListener(Event.COMPLETE,comp)
var vars : URLVariables
urlr.method = URLRequestMethod.POST
function clc(e:Event){
vars = new URLVariables()
vars.EVENTTARGET = "ctl00$contentPH$facultyDDL"
vars.EVENTARGUMENT = "80"
urlr.data = vars
loader.load(urlr)
}
function comp(e:Event){
t2.text = (e.target.data)
}
答案 0 :(得分:1)
你可以使用这样的POST变量:
function clc(e:Event){
var request:URLRequest = new URLRequest("'https://services.just.edu.jo/courseschedual/index.aspx");
var variables:URLVariables = new URLVariables();
variables.EVENTTARGET = "ctl00$contentPH$facultyDDL"
variables.EVENTARGUMENT = "80"
request.data = variables;
request.method = URLRequestMethod.POST;
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.load(request);
}
function handleComplete(e:Event):void{
var loader:URLLoader = URLLoader(event.target);
var vars:URLVariables = new URLVariables(loader.data);
}