使用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: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");  //不能工作

posted on 2009-05-28 21:56  小龙龙  阅读(610)  评论(0编辑  收藏  举报

导航