在javascrit中怎样来刷新页面
a页面里iframe了个b页面,我想实现在b页面里一个按钮,一按就刷新a页面,也就是父页面,不是只刷新iframe里面的b页面 哦~
请问b页面里的<input type="button" class="btn" value=" 返 回 " onclick="history.back();">那个onclick 要怎么写呢?啊哈
答案是:parent.location.reload() ;
以下是网上的:
十一种刷新按钮的方法。很不错的,经常上网要找。哈哈。这下放这里了。
<input type=button value=刷新 onclick="history.go(0)">
<input type=button value=刷新 onclick="location.reload()">
<input type=button value=刷新 onclick="location=location">
<input type=button value=刷新 onclick="location.assign(location)">
<input type=button value=刷新 onclick="document.execCommand('Refresh')">
<input type=button value=刷新 onclick="window.navigate(location)">
<input type=button value=刷新 onclick="location.replace(location)">
<input type=button value=刷新 onclick="window.open('自身的文件','_self')">
<input type=button value=刷新 onClick=document.all.WebBrowser.ExecWB(22,1)>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
<form action="自身的文件">
<input type=submit value=刷新>
</form>
<a id=a1 href="自身的文件"></a>
<input type=button value=刷新 onclick="a1.click()">
iframe中刷新顶层窗口
MAIN.JSP页面使用IFRAME来内嵌了一个内容页面(A.JSP),如何实现用户点击A.JSP页面的连接时,能更新它的父页面(MAIN.JSP)的内容呢?
window.parent.location.reload();
window.parent.location.href="地址";
window.top 当前窗口的最顶层窗口
最新文章
- 如何写出优雅的Python(二)
- 数据泵如何生成导出文件的DDL脚本
- C#套接字和windowsAPI套接字
- thinkphp计划任务使用cronRun
- ruby -- 问题解决(六)link_to to destroy not working
- C# 多线程 简单使用方法以及常用参数
- 《Prism 5.0源码走读》Prism 5.0简介
- Leetcode 225 Implement Stack using Queues
- 关于添加非系统framework后,import导入头文件时没有提示的解决办法
- Ubuntu 13.04 配置Cocos2d-x记录
- 使用ReTrofit做缓存(结合上拉加载和下拉刷新)
- 亚马逊AWS EC2云实例AMI安装LNMP环境(3)——Mysql5.5
- plsql developer 使用 oracle instantclient的安装和配置
- UDP和TCP的差异
- 用Mysql进行emp、dept、salgrade表的相关查询操作
- LeetCode算法题-K-diff Pairs in an Array(Java实现)
- PDF的水印怎么去掉
- 使用git提交项目到码云
- UML之涉众/参与者(角色/执行者)(Actor)/业务主角(BusinessActor)/业务工人(BusinessWorker)/用户/角色辨析【图解】
- Python中字典get方法的使用
热门文章
- 公众平台关注用户达到5万即可开通流量主功能 可以推广APP应用
- Mac Pro 利用PHP导出SVN新增或修改过的文件
- JavaScript获取浏览器高度和宽度值(documentElement,clientHeight,offsetHeight,scrollHeight,scrollTop,offsetParent,offsetY,innerHeight)
- 【荐】怎么用PHP发送HTTP请求(POST请求、GET请求)?
- 交叉编译中的build、host和target
- UVA2639
- rails enum用于存储数据
- redis cluster php 客户端 predis
- PHP的命名空间 与类是自动加载
- WinForm/MIS项目开发之中按钮级权限实践