如何使用Javascript刷新IFrame? [英] How to refresh an IFrame using Javascript?

查看:81
本文介绍了如何使用Javascript刷新IFrame?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有IFrame和Button的网页,按下按钮后我需要刷新IFrame。这有可能,如果是这样的话怎么样?我搜索过,找不到任何答案。

I have a webpage with an IFrame and a Button, once the button is pressed I need the IFrame to be refreshed. Is this possible, if so how? I searched and could not find any answers.

推荐答案

var iframe = document.getElementById('youriframe');
iframe.src = iframe.src;

这篇关于如何使用Javascript刷新IFrame?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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