javascript - 读取 AS3 中的浏览器 URL?

标签 javascript html flash apache-flex flex3

我的应用程序作为父应用程序的 IFrame 中的选项卡与其他应用程序集成。

我想读取浏览器地址栏 URL。

是否可以阅读。

<iframe id="myIFrameID123" src="http://192.168.1.102:8080/om/om.html?ucode=" width="100%" height="600"></iframe>

并尝试访问父应用 URL

var search:String = ExternalInterface.call("window.location.search.toString");
var vars:URLVariables = new URLVariables(search);

如果可以读取地址栏 URL 就可以了... 两个应用程序在不同的 JBOS 中运行。

最佳答案

如果可以读取地址栏 URL

是的,可以使用:

import flash.external.*;
var curUrl:String =  String( ExternalInterface.call(" function(){ return document.location.href.toString();}"));

关于javascript - 读取 AS3 中的浏览器 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13265005/

相关文章:

css - 如何在html中设置span标签的宽度

javascript - 根据浏览器包含不同的 JavaScript 文件?

flash - ActionScript 3 和 SSH

flash - Flash 播放 .avi 还是 .mpg4?如果是,如何?

javascript - 在所有浏览器版本中出现特定错误

javascript - 使用 Google Apps 脚本获取已发送文件夹中的未读计数 - GMail

javascript - 从数据库中获取数据并将其放入选择列表中

javascript - 使用 javascript 滚动查看 firefox

javascript - 从服务器路径检索图像

javascript - 如何访问Flash中的html元素?