jquery教程

推荐列表 站点导航

当前位置:首页 > jquery > jquery教程 >

asp网页自动刷新方法汇总

来源:网络整理  作者:  发布时间:2020-12-22 23:33
本文介绍了asp\html页面中实现网页自动刷新的方法,一些自动刷新页面的小例子,有需要的朋友参考下。...

本节内容:
自动刷新页面方法总结

参考如下:
1),<meta http-equiv="refresh" content="10">
10表示间隔10秒刷新一次

2),<script>
window.location.reload(true);
</script>
如果是你要刷新某一个iframe就把window给换成frame的名字或ID号

3),<script>
window.navigate("本页面url");
 

复制代码 代码示例:

</script>
function abc()
{
window.location.href="/blog/window.location.href";
setTimeout("abc()",10000);
}
 

刷新本页:
Response.Write("<script>window.location.href=window.location.href;</script>")
刷新父页:
Response.Write("<script>opener.location.href=opener.location.href;</script>")
转到指定页:
Response.Write("<script>window.location.href='yourpage.aspx';</script>")
刷新页面实现方式总结(HTML,ASP,JS)
定时刷新:
<script>setTimeout("location.href='url'",2000)</script>
说明:url是要刷新的页面URL地址
2000是等待时间=2秒,

2.
说明:
n is the number of seconds to wait before loading the specified URL.
url is an absolute URL to be loaded.
n,是等待的时间,以秒为单位
url是要刷新的页面URL地址

3.
说明:一般用一个url参数或者表单传值判断是否发生某个操作,然后利用response.redirect 刷新。

4.
刷新框架页
 

复制代码 代码示例:

<script language=javascript>top.leftFrm.location.reload();parent.frmTop.location.reload(); 弹出窗体后再刷新的问题
Response.Write("<script>window.showModalDialog('../OA/SPCL.aspx',window,'dialogHeight: 300px; dialogWidth: 427px; dialogTop: 200px; dialogLeft: 133px')</script>");//open
Response.Write("<script>document.location=document.location;</script>");
 

在子窗体页面代码head中加入刷新的内容加在 if (!IsPostBack) 中

在框架页中右面刷新左面
 

复制代码 代码示例:

//刷新框架页左半部分

Response.Write("<script>");
Response.Write("parent.left.location.href='PayDetailManage_Left.aspx'");
Response.Write("</script>");
 

页面定时刷新功能实现

有三种方法:
1,在html中设置:
之後加入下面这一行即可!
定时刷新:
10代表刷新间隔,单位为秒

2.jsp
<!--esponse.setHeader("refresh","1");-->
每一秒刷新一次

3.使用javascript:
<script>
setTimeout("self.location.reload();",1000);
<script>
一秒一次

相关热词: 方法

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jq/jc/7676.shtml

相关文章
最新文章
PHP识别相片是否是颠倒的 PHP识别相片是否是颠倒的

时间:2020-12-28

python编程有哪些ide python编程有哪些ide

时间:2020-12-28

python开发工程师是做什么 python开发工程师是做什么

时间:2020-12-28

php构造函数的作用 php构造函数的作用

时间:2020-12-28

php怎么跟数据库连接 php怎么跟数据库连接

时间:2020-12-28

php实现顺序线性表 php实现顺序线性表

时间:2020-12-28

Python多重继承中的菱形继 Python多重继承中的菱形继

时间:2020-12-28

php中break的作用 php中break的作用

时间:2020-12-28

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

asp网页自动刷新方法汇总

2020-12-22 编辑:

本节内容:
自动刷新页面方法总结

参考如下:
1),<meta http-equiv="refresh" content="10">
10表示间隔10秒刷新一次

2),<script>
window.location.reload(true);
</script>
如果是你要刷新某一个iframe就把window给换成frame的名字或ID号

3),<script>
window.navigate("本页面url");
 

复制代码 代码示例:

</script>
function abc()
{
window.location.href="/blog/window.location.href";
setTimeout("abc()",10000);
}
 

刷新本页:
Response.Write("<script>window.location.href=window.location.href;</script>")
刷新父页:
Response.Write("<script>opener.location.href=opener.location.href;</script>")
转到指定页:
Response.Write("<script>window.location.href='yourpage.aspx';</script>")
刷新页面实现方式总结(HTML,ASP,JS)
定时刷新:
<script>setTimeout("location.href='url'",2000)</script>
说明:url是要刷新的页面URL地址
2000是等待时间=2秒,

2.
说明:
n is the number of seconds to wait before loading the specified URL.
url is an absolute URL to be loaded.
n,是等待的时间,以秒为单位
url是要刷新的页面URL地址

3.
说明:一般用一个url参数或者表单传值判断是否发生某个操作,然后利用response.redirect 刷新。

4.
刷新框架页
 

复制代码 代码示例:

<script language=javascript>top.leftFrm.location.reload();parent.frmTop.location.reload(); 弹出窗体后再刷新的问题
Response.Write("<script>window.showModalDialog('../OA/SPCL.aspx',window,'dialogHeight: 300px; dialogWidth: 427px; dialogTop: 200px; dialogLeft: 133px')</script>");//open
Response.Write("<script>document.location=document.location;</script>");
 

在子窗体页面代码head中加入刷新的内容加在 if (!IsPostBack) 中

在框架页中右面刷新左面
 

复制代码 代码示例:

//刷新框架页左半部分

Response.Write("<script>");
Response.Write("parent.left.location.href='PayDetailManage_Left.aspx'");
Response.Write("</script>");
 

页面定时刷新功能实现

有三种方法:
1,在html中设置:
之後加入下面这一行即可!
定时刷新:
10代表刷新间隔,单位为秒

2.jsp
<!--esponse.setHeader("refresh","1");-->
每一秒刷新一次

3.使用javascript:
<script>
setTimeout("self.location.reload();",1000);
<script>
一秒一次

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jq/jc/7676.shtml

相关文章

风云图片

推荐阅读

返回jquery教程频道首页