如何解决这个 iGoogle-gadget 问题?

发布于 2024-07-26 22:27:00 字数 400 浏览 4 评论 0原文

我想要制作一个“iGoogle 小工具”来更改 igoogle 页面上的搜索框。
到目前为止,这是我的代码:

<script type="text/javascript">
function bing(){
  document.getElementById('sfrm').action="http://www.bing.com/search";
}
</script>
<input type="button" onclick="bing()" value="Search"><br>with Bing.

我已经使用单独页面上的页面搜索框代码对其进行了简要测试,并且它有效。
是不是因为它在框架中而不起作用? 如果是的话有解决办法吗?

I want make an 'iGoogle gadgets' that changes the search box on the igoogle page.
Here is my code so far:

<script type="text/javascript">
function bing(){
  document.getElementById('sfrm').action="http://www.bing.com/search";
}
</script>
<input type="button" onclick="bing()" value="Search"><br>with Bing.

I have tested it briefly with the pages search box code on a separate page, and it worked.
Does it not work because it is in a frame; if so is there a solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

汐鸠 2024-08-02 22:27:00

我有一种感觉,谷歌可能设计 iGoogle 来防止修改那些东西......

I have a feeling that Google probably designed iGoogle to prevent modifying that stuff...

清君侧 2024-08-02 22:27:00

我记得他们有不同类型的小工具模式。 允许在页面上进行更多访问的模式有一种“内联”模式。 不过我不确定。 我只是在网上快速搜索了一下,但没有结果。 也许他们已经放弃了它,你必须寻找它。

//编辑
尝试一下,

<Content type="html-inline">

不确定是否有效,没有尝试过。

I remember that they had different kind of gadget modes. The one allowing more access on the page had a mode like "inline". I'm not sure however. I just did a quick search on the web with no result however. Maybe they have dropped that, you'd have to search for it.

//Edit
Try with

<Content type="html-inline">

I'm not sure whether it will work, didn't try it out.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文