JS实现刷新iframe的方法
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe>
方案一:用iframe的name属性定位
<input type="button" name="Button" value="Button"
onclick="document.frames('ifrmname').location.reload()">
或
<input type="button" name="Button" value="Button"
onclick="document.all.ifrmname.document.location.reload()">
方案二:用iframe的id属性定位
<input type="button" name="Button" value="Button"
onclick="ifrmid.window.location.reload()">
终极方案:当iframe的src为其它网站地址(跨域操作时)
<input type="button" name="Button" value="Button"
onclick="window.open(document.all.ifrmname.src,'ifrmname','')">
关键词:JS,iframe
相关阅读
- 12-15jsp是什么文件?jsp文件怎么打开?
- 08-12jsp是什么格式文件 如何打开jsp格式的文件
- 06-25js判断是否是IE浏览器的几种方法
- 06-25JS 获取上传文件大小的方法
- 06-25js返回上一页方法示例
- 06-25js中文显示乱码或在页面显示乱码解决方法
- 10-31如何禁止IIS缓存静态文件(png、js、html)
- 09-08用JS防止网站被挂IFRAME木马
- 01-10div+css下js浮动对联广告不随屏幕滚动的解决方法
- 12-31js技巧之清除表单所有内容
阅读本文后您有什么感想? 已有 人给出评价!
用户评论
热门评论
最新评论
相关软件
热点图文
- 06-25js中文显示乱码或在页面显示乱码解决方法
- 06-25最简单的方法去掉iframe滚动条
- 06-25JS 获取上传文件大小的方法
- 12-31js技巧之清除表单所有内容
- 06-09网站图片延迟加载的实现
- 06-25JavaScript下拉菜单实例
- 06-25js判断是否是IE浏览器的几种方法
- 12-31W3C中使用的对联漂浮广告代码
- 06-25JavaScript日期格式转换
- 06-25js返回上一页方法示例