該方法的聲明是
getURL(
url:String
[,
window:String
[,
"variables":String
]])
: Void
url是網頁路徑,也可以採用相對路徑,如
http://localhost:8080/flexweb/index.jspflexweb/index.jsp
window是指網頁打開的狀態,_blank,_self,_ parent,_top等
variables A
GET
or POST
表示在url後面加參數傳遞給後台時採用的傳輸方式.我在測試時加這個參數,getURL就不出效果,只能去掉才行.下面是使用的例子
getURL("mailto:you@somedomain.com");
getURL("javascript:alert('you clicked me')");
getURL("http://www.macromedia.com", "_blank", "GET"); //不能工作
getURL("http://www.macromedia.com", "_blank"); //能工作
getURL("http://www.macromedia.com", "_blank", "POST"); //不能工作