1. this.response.write("<script>opener.location.reload();</script>");
2. this.response.write("<script>opener.window.location.href = opener.window.location.href;</script>");
3. Response.Write("<script language=javascript>opener.window.navigate(''你要刷新的頁.asp'');</script>")
JS刷新框架的腳本語句
//如何刷新包含該框架的頁面用
<script language=JavaScript>
parent.location.reload();
</script>
//子窗口刷新父窗口
<script language=JavaScript>
self.opener.location.reload();
</script>
( 或 <a href="javascript:opener.location.reload()">刷新</a> )
//如何刷新另一個框架的頁面用
<script language=JavaScript>
parent.otherFrameID.location.reload();
</script>
如果想關閉窗口時刷新或者想開窗時刷新的話,在<body>中調用以下語句即可。
<body onload="opener.location.reload()"> 開窗時刷新
<body onUnload="opener.location.reload()"> 關閉時刷新
<script language="javascript">
window.opener.document.location.reload()
</script>
Javascript刷新頁面(javascript refresh page)的幾種方法:
1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refresh')
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href
自動刷新頁面的方法:
1.頁面自動刷新:把如下代碼加入<head>區域中
<meta http-equiv="refresh" content="20">
其中20指每隔20秒刷新一次頁面.
2.頁面自動跳轉:把如下代碼加入<head>區域中
<meta http-equiv="refresh" content="20;url=http://www.wyxg.com">
其中20指隔20秒後跳轉到http://www.wyxg.com頁面
3.頁面自動刷新js版
<script language="JavaScript">
function myrefresh()
{
window.location.reload();
}
setTimeout('myrefresh()',1000); //指定1秒刷新一次
</script>
[.NET Core].NET Core R2安装教程及Hello示例
PHP openssl加密扩展使用总结
PHP 运行方式(PHP SAPI介绍)
SQL用法操作合集
PHP mcrypt加密扩展使用总结
PHP header函数的几大作用
JS中的Navigator 对象
数据在内存中存储的方式:大端模式与小端模式
C++中各种数据类型占据字节长度
- 最新文章
-
『.NET Core CLI工具文档』(十)dotnet-build
『.NET Core CLI工具文档』(九)dotnet-run
『.NET Core CLI工具文档』(八)dotnet-restore
『.NET Core CLI工具文档』(七)dotnet-new
『.NET Core CLI工具文档』(六)dotnet 命令
『.NET Core CLI工具文档』(二).NET Core 工具遥测(应用信息收集)
『.NET Core CLI工具文档』(一).NET Core 命令行工具(CLI)
reStructuredText(rst)快速入门语法说明
Markdown通用的常用语法说明
Git同步原始仓库到Fork仓库中
- 热门文章
-
在CentOS 7上安装.NET Core R2跑Hello World
在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
解决Bash On Ubuntu On Window安装Zsh无效问题附安装说明
在CentOS或RHEL上安装Nux Dextop仓库
手把手教从零开始在GitHub上使用Hexo搭建博客教程(四)-使用Travis自动部署Hexo(2)
手把手教从零开始在GitHub上使用Hexo搭建博客教程(三)-使用Travis自动部署Hexo(1)
手把手教从零开始在GitHub上使用Hexo搭建博客教程(二)-Hexo参数设置
Visual Studio问题集锦:coloader80.dll未正确安装
手把手教从零开始在GitHub上使用Hexo搭建博客教程(一)-附GitHub注册及配置
[WinForm]WinForm跨线程UI操作常用控件类大全