Google 电子表格重定向 [英] Google Spreadsheets redirect

查看:59
本文介绍了Google 电子表格重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Is it possible to redirect a URL in Google Spreadsheets script editor? I tried this, but it redirects before script is finished:

<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>

谢谢

推荐答案

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

I think that google uses a protection like this to prevent the use of spreedsheet in an iframe

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

这是什么?

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

这篇关于Google 电子表格重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆