【问题标题】:How to get iFrame source code inside a webview?如何在 webview 中获取 iFrame 源代码?
【发布时间】:2017-01-18 07:23:49
【问题描述】:

我想在 webview 中获取 iFrame 源代码,但出现错误:-

"Uncaught SecurityError: Blocked a frame with origin "http://........." from accessing a frame with origin "https://.........".  The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.

请深入了解错误。

注意:- 我无法将地址从 http 更改为 https。

【问题讨论】:

    标签: javascript java android


    【解决方案1】:

    有了那个错误日志,我认为主 URL 的协议是 http:// 并且你想添加带有 url 协议 https:// 的 iFrame 它会抛出这个异常,你可以尝试使用相同的协议 http://案例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-14
      • 2017-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多