【问题标题】:Don't want to show LINK used on IFRAME KML the my site不想在我的网站上显示 IFRAME KML 上使用的 LINK
【发布时间】:2015-09-23 07:34:11
【问题描述】:

在标签 a 中显示 kml 链接 google , 但 , 不在 iframe 中显示 kml 链接 google , iframe中am显示不成功

<a href="https://www.google.com/maps/d/viewer?mid=zmLLyZ0RAAIY.kpwcoomkTAXw&usp=sharing">link</a>

<iframe src="https://www.google.com/maps/d/viewer?mid=zmLLyZ0RAAIY.kpwcoomkTAXw&usp=sharing"></iframe>

【问题讨论】:

  • 也许有更多细节?这两行代码无法帮助我们理解您的要求
  • 在标签a中显示kml链接google,但是,在iframe中不显示kml链接google,在iframe中显示不成功
  • Iframe 内容受同域策略约束。如果它来自您的域,您可以控制它,如果不是,您将被锁定。这可以防止各种基于 iframe 的页面劫持。由于问题中的链接来自谷歌地图,我猜它不是来自您的域。因此,除非您在服务器端进行一些预处理,否则您将无法使用 iframe 中的链接。
  • 服务器端的处理?

标签: javascript html google-maps iframe


【解决方案1】:

&lt;iframe src="https://www.google.com/maps/d/embed?mid=zmLLyZ0RAAIY.kpwcoomkTAXw&amp;usp=sharing"&gt;&lt;/iframe&gt;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-02
    • 2014-07-05
    • 2022-08-19
    • 2021-04-29
    • 2021-10-26
    • 2015-07-19
    • 2014-04-19
    • 1970-01-01
    相关资源
    最近更新 更多