0

我正在将谷歌趋势嵌入到 HTML 页面中,并希望传递包括 ö、ä 和 ü 等变音符号在内的短语。
但图表总是空出来的。

我为这些字符尝试了不同的编码,例如:(以ö为例)

H%25C3%25B6rfigur 

或者

H%C3%B6rfigur 

或者

H%F6rfigur

我试过这段代码:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/925_RC01/embed_loader.js"></script>
  <script type="text/javascript">
    trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"H%25C3%25B6rfigur","geo":"AT","time":"today 5-y"}],"category":0,"property":""}, {"exploreQuery":"geo=AT-4&q=sheep","guestPath":"https://trends.google.at:443/trends/embed/"});
  </script>

请帮助我,我现在正在工作时间!

4

1 回答 1

1

您是否尝试访问google.com/trends/explore并从嵌入对话框中复制?

例如对于https://trends.google.com/trends/explore?q=%C3%BCber,我得到以下嵌入代码,它工作正常:

<script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/1280_RC06/embed_loader.js"></script> <script type="text/javascript"> trends.embed.renderExploreWidget("TIMESERIES", {"comparisonItem":[{"keyword":"über","geo":"","time":"today 12-m"}],"category":0,"property":""}, {"exploreQuery":"q=%C3%BCber&date=today 12-m","guestPath":"https://trends.google.com:443/trends/embed/"}); </script> 

您的查询是否可能根本没有足够的数据来显示?

于 2018-01-21T15:44:59.213 回答