【问题标题】:Can't add a js snippet from google trends into an HTML page无法将谷歌趋势中的 js 片段添加到 HTML 页面中
【发布时间】:2014-07-16 22:35:20
【问题描述】:

我正在尝试添加一个 js 脚本以使 google 趋势显示在 html 页面上。我直接从http://goo.gl/4C92vk 的第一个图形中对嵌入代码进行分级,并将其转换为以下内容,这不起作用

<html>
<body>
<script type="text/javascript" src="//www.google.com/trends/embed.js?hl=en-US&q=chicago+marathon&cmpt=q&content=1&cid=TIMESERIES_GRAPH_0&export=5&w=500&h=330"></script>
</body>
</html>

有什么想法吗?谢谢

【问题讨论】:

    标签: javascript html


    【解决方案1】:
    <body>
    <div>
    <script type="text/javascript">
    document.write('<iframe scrolling="no" style="border:none;" width="250" height="413" src="http://www.google.com/trends/hottrends/widget?pn=p1&amp;tn=10&amp;h=413"></iframe>');
    </script>
    </div>
    </body>
    

    【讨论】:

      猜你喜欢
      • 2015-03-08
      • 1970-01-01
      • 2013-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多