使用getURL()在flex中打開新的網頁

根據flex1.5的doc,使用getURL()可以打開或跳轉網頁
該方法的聲明是
  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:[email protected]");
  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");  //不能工作

你可能感兴趣的:(Flex)