从另一帧刷新其他帧。 jQuery的 [英] Refresh other frame, from another frame. Jquery

查看:89
本文介绍了从另一帧刷新其他帧。 jQuery的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以重新加载用户来自的页面,或者更好的是,重新加载用户来自的框架(如果它与URL匹配)?

Is it possible to reload the page, where the user came from or, even better, reload the frame the user came from, if it matches an URL?

我有一个链接。用户单击它,然后在新窗口中打开一个新URL。表单将在该新窗口中运行。我想要的是一个重新加载第一个窗口的功能(用户来自哪里)

I have a link. The user clicks it, and it opens in a new window, a new url. A form will run in that new window. What I want, is a function to reload the first window (Where the user came from)

这可能吗?

推荐答案

好的。这是你做的(只是一个例子,经过测试,有效):

Alright. Here is what you do (just an example, tested, works):

test.html

test.html

<frameset cols="50%, 50%">
<frame name="f1" src="frame1.html">
<frame name="f2" src="frame2.html">
</frameset>

frame1.html

frame1.html

<input type="button" name="test" value="Refresh" onclick="parent.f2.location.reload()"> 

frame2.html

frame2.html

<span>Hello World</span>

变量 parent 是当前的父级框架。

variable parent is the parent of the current frame.

阅读。它非常有用

希望有帮助

这篇关于从另一帧刷新其他帧。 jQuery的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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