是否可以判断iFrame的src是否已更改? [英] Is it possible to tell if the src of an iFrame has changed?

查看:248
本文介绍了是否可以判断iFrame的src是否已更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以判断iFrame的来源是否已将客户端重定向到另一个页面?如果是这样,请告诉客户端重定向到哪个页面?

Is it possible to tell if the source of an iFrame has redirected the client to another page? And if so, tell what page the client got redirected to?

推荐答案

onload 事件

喜欢

<iframe src="http://www.mydomain/" onLoad="alert('fire');"></iframe>

只要iframe中的位置发生变化,警报就会弹出。
查看此处

The alert will pop-up whenever the location within the iframe has changed. check it out here also

这是一个解释如何获取iframe的当前位置

这篇关于是否可以判断iFrame的src是否已更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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