FLEX通过URL传递参数
FLEX通过URL传递参数
1. URL:http://192.168.0.107:8088/com.sunway.workflow.designer/Designer.html?debug=true#id=aaa
2. 获取方式:
var myBrowser:IBrowserManager = BrowserManager.getInstance();
myBrowser.init();
detail.text += "完整网址:"+myBrowser.url+"\n";
detail.text += "基本网址:"+myBrowser.base+"\n";
detail.text += "网址后缀:"+myBrowser.fragment+"\n";
detail.text += "URL 端口:"+URLUtil.getPort(myBrowser.url)+"\n";
detail.text += "URL 协议:"+URLUtil.getProtocol(myBrowser.url)+"\n";
var vals:Object = URLUtil.stringToObject(myBrowser.fragment);
detail.text += "id参数:"+vals.id+"\n";
?
得到的id参数:aaa