国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 課堂 > 基礎知識 > 正文

網頁的自動刷新代碼集合

2024-09-09 00:41:54
字體:
來源:轉載
供稿:網友

自動刷新頁面的實現方法總結:
  
  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)
  ‘by aloxy
  
  定時刷新:
  
  <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中設置:
  之後加入下面這一行即可!

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 白河县| 云龙县| 鄱阳县| 盐源县| 布尔津县| 石台县| 大城县| 连城县| 虹口区| 大悟县| 临清市| 仪陇县| 洛扎县| 阿拉善右旗| 云浮市| 赤壁市| 运城市| 临武县| 谷城县| 汝阳县| 健康| 大丰市| 鞍山市| 沾益县| 城步| 顺义区| 织金县| 杭锦旗| 崇文区| 绍兴县| 台中市| 赣州市| 荔浦县| 囊谦县| 南昌市| 萝北县| 兴安盟| 瑞金市| 精河县| 都安| 彩票|