1、asp.net如何刷新页面
 因为有时候我做个效果,非得点IE的刷新才能看到
2、如何获得IE地址栏中的网址
 我想用重定向来解决1、的问题,但是如何获得IE随时变化的地址呢
有些迷惑
请大侠指点

解决方案 »

  1.   

    客户端脚本 JScript/JavaCscrpt
    <script>
    function myRefresh(){
        window.open(self.location.href,'_self');
    }
    </script>////如果页面是对话框则不要这样使用.
      

  2.   

    // 自动 COPY 代码开始 by 风筝
    function MM_findObj(n, d) { //v4.0
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && document.getElementById) x=document.getElementById(n); return x;
    }
    function JM_cc(ob){
    var obj=MM_findObj(ob); if (obj) { 
    obj.select();js=obj.createTextRange();js.execCommand("Copy");}
    alert("已经复制成功,你可以在任何地方粘贴出去了!");
    }// 自动 COPY 代码结束 by 风筝
    document.write('<p><input maxLength="0" size="0" name="page_url" style="color: #082D71; height: 0; font-size: 9pt; border-left: 1px solid #082D72; border-right: 1px solid #082D71; border-top: 1px solid #082D71; border-bottom: 1px solid #082D71; background-color: #535353; width:0" value="'+window.location.href+'"><input type="button" name="Button0" style="color: #FFFF00; height: 19; font-size: 9pt; border-left: 1px solid #353535; border-right: 1px solid #353535; border-top: 1px solid #353535; border-bottom: 1px solid #353535; background-color: #353535; width:79; text-align:right" value="复制本页网址" onClick=JM_cc("page_url")></p>');
      

  3.   

    刷新可以有两种实现:第一:javascript方法:window.location.reload();
    第二:strUrl代表当前也面地址:Response.Redirect(strUrl);得到当前页面的地址:Request.Url.ToString().
      

  4.   

    litp(天道酬勤)
    定时自动刷新页面 
    实现:
    <meta HTTP-EQUIV=REFRESH CONTENT=300;URL=online.asp>
    1. 
    <meta http-equiv="refresh" content="5"> 
    2. 
    <body onload="setTimeout('history.go(0)',5000)">
    3.
    <body onload="setTimeout('this.location.reload();',5000)"> 
    4.
    setTimeout("document.location='www.usa.com'",3000) 1,页面自动刷新:把如下代码加入<head>区域中<meta http-equiv="refresh" content="20">,其中20指每隔20秒刷新一次页面.2,页面自动跳转:把如下代码加入<head>区域中<meta http-equiv="refresh" content="20;url=http://www.njcatv.net">,其中20指隔20秒后跳转到http://www.njcatv.net页面。 button:<INPUT TYPE="button" onclick="javascript:location.reload();">