欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

網(wǎng)頁的自動(dòng)刷新代碼集合

  發(fā)布時(shí)間:2009-07-22 17:51:34   作者:佚名   我要評(píng)論
自動(dòng)刷新頁面的實(shí)現(xiàn)方法總結(jié),一般這類功能都是通過refresh或js實(shí)現(xiàn)

自動(dòng)刷新頁面的實(shí)現(xiàn)方法總結(jié):
  
  1)
  <meta http-equiv="refresh" content="10">
  10表示間隔10秒刷新一次
  
  2)
  <script>
  window.location.reload(true);
  </script>
  如果是你要刷新某一個(gè)iframe就把window給換成frame的名字或ID號(hào)
  
  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>")
  轉(zhuǎn)到指定頁:
  
  Response.Write("<script>window.location.href='yourpage.aspx';</script>")
  刷新頁面實(shí)現(xiàn)方式總結(jié)(HTML,ASP,JS)
  ‘by aloxy
  
  定時(shí)刷新:
  
  <script>setTimeout("location.href='url'",2000)</script>
  說明:url是要刷新的頁面URL地址
  2000是等待時(shí)間=2秒,
  
  2.
  說明:
  n is the number of seconds to wait before loading the specified URL.
  url is an absolute URL to be loaded.
  n,是等待的時(shí)間,以秒為單位
  url是要刷新的頁面URL地址
  
  3.
  說明:一般用一個(gè)url參數(shù)或者表單傳值判斷是否發(fā)生某個(gè)操作,然后利用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中加入刷新的內(nèi)容加在 if (!IsPostBack) 中
  
  在框架頁中右面刷新左面
  //刷新框架頁左半部分
  
  Response.Write("<script>");
  Response.Write("parent.left.location.href='PayDetailManage_Left.aspx'");
  Response.Write("</script>");
  頁面定時(shí)刷新功能實(shí)現(xiàn)
  
  有三種方法:
  1,在html中設(shè)置:
  之後加入下面這一行即可!
  定時(shí)刷新:
  10代表刷新間隔,單位為秒
  
  2.jsp
  
  <!--esponse.setHeader("refresh","1");-->
  每一秒刷新一次
  
  3.使用javascript:
  
  <script>
  setTimeout("self.location.reload();",1000);
  <script>
  一秒一次
  
  頁面自動(dòng)跳轉(zhuǎn):
  1.在html中設(shè)置:
  之後加入下面這一行即可!
  定時(shí)跳轉(zhuǎn)并刷新: ,
  其中20指隔20秒后跳轉(zhuǎn)到http://自己的URL 頁面。
  點(diǎn)擊按鈕提交表單后刷新上級(jí)窗口
  
  A窗口打開B窗口
  
  然后在B里面提交數(shù)據(jù)至C窗口
  
  最后要刷新A窗口
  
  并且關(guān)閉B窗口
  
  幾個(gè)javascript函數(shù)
  
  //第一個(gè)自動(dòng)關(guān)閉窗口
  
  <script>
  <!--<br /> function clock(){i=i-1<br /> document.title="本窗口將在"+i+"秒后自動(dòng)關(guān)閉!";<br /> if(i>0)setTimeout("clock();",1000);<br /> else self.close();}<br /> var i=2<br /> clock();<br /> //-->
  </script>
  //第二個(gè)刷新父頁面的函數(shù)
  
  <script>
  opener.location.reload();
  </script>
  //第三個(gè)打開窗口
  
  <script>
  function show(mylink,mytitle,width,height)
  {mailwin=window.open(mylink,mytitle,'top=350,left=460,width='+width+',height='+height+',scrollbars=no')}
  </script>

相關(guān)文章

最新評(píng)論