【问题标题】:Javascript message within iframeiframe 中的 Javascript 消息
【发布时间】:2013-01-20 01:44:46
【问题描述】:

在 Chrome 中运行 html 文件时出现此错误:

iframe 不安全的 JavaScript 尝试从 URL http‍://another_server/example.html 的框架访问具有 URL http‍://my_server.com/param 的框架。域、协议和端口必须匹配。

有没有办法让我可以在不同的服务器上运行 Javascript?

【问题讨论】:

标签: javascript security cross-browser dom-events


【解决方案1】:

您需要更改 hash 而不是 url 本身。关于这个问题,stackoverflow 中有很多类似的问题。 You can try check this out

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-12-05
    • 1970-01-01
    • 1970-01-01
    • 2019-02-03
    • 1970-01-01
    • 2022-07-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多