Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > Java > 页面刷新问题整理
【标  题】:页面刷新问题整理
【关键字】:
【来  源】:http://www.cublog.cn/u/13625/showart.php?id=107051

页面刷新问题整理

Your Ad Here

A:刷新和重新向服务器发一次请求区别
Q:刷新不会丢失request中的参数。而重新向服务器发出一次请求,request中的参数会被覆盖。

A:子页面如何部分刷新父页面?
Q:
1.刷新本页面:
response.Write("window.document.location.reload();");
Response.End()    //如果终止的话加此句


2.刷新父页面:
this.Response.Write("<script language='javascript'>window.parent.opener.document.frmMain.submit();"
+  "window.parent.close();</script>");

 


在子页面的cs中的Page_Load:
if (!IsPostBack)
{
    CloseButton.Attributes.Add("onclick","_SetValue();");
}

在子页面的客户端:
<script language="javascript">
function _SetValue()
{
    var lblRelated = window.opener.document.getElementById('Related');
    var lblQuery = document.getElementById('Query');
   
    lblRelated.innerText = lblQuery.innerText;
   
    window.close();
}
</script>

A:实现页面中按钮刷新的N种方法
Q:
 <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()">

 

A:JavaScript实现页面刷新
Q:
location.reload和history.go(0)
不过后者有个好处,能保持页面滚动条的位置
location.href = location.href
这在弹出窗口里刷页面有效,而前两者会失效

 

 

移动jdk后,导致NetBeans5.0无法启动的修复:【上一篇】
JAVA Reflection code example:【下一篇】
【相关文章】
没有相关文章
【随机文章】
  • c 二叉树基本操作
  • 《给初学者的Windows Vista的补遗手册》之077
  • EJB事务处理
  • 技巧:从键盘输入生成文件的若干方法
  • oracle后台进程
  • java 可获取桌面的大小
  • 通过jsp实现对数据的批量更新
  • mysql的分区概要
  • 各类unix和linux密码丢失解决方法
  • 数据结构的学习--堆排序
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.