【问题标题】:Google Spreadsheets redirect谷歌电子表格重定向
【发布时间】:2014-05-15 14:41:19
【问题描述】:

是否可以在 Google 电子表格脚本编辑器中重定向 URL? 我试过这个,但它在脚本完成之前重定向:

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
   $(function() 
      {$("#myiframe").load(window.location.replace('https://www.yahoo.es');});
</script>
<iframe src="https://docs.google.com/a/ageinfo.es/spreadsheets/d/ID" width="760"
     height="700" frameborder="0" marginheight="0" marginwidth="0">
   Loading...
</iframe>

谢谢

【问题讨论】:

    标签: javascript redirect spreadsheet


    【解决方案1】:

    我认为谷歌使用这样的保护来防止在 iframe 中使用电子表格

    if ( window.top !== window.self )
    {
        window.top.location=window.self.location;
    }
    

    这是什么?

    $(function() 
    {
       $("#myiframe").load(window.location.replace('https://www.yahoo.es');
    })
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多