Hopes

          Start Here..

           

          ASP.NET如何刷新父窗口的javascript腳本

          ASP.NET如何刷新父窗口的javascript腳本

          ASP.NET如何輸出刷新父窗口腳本語句

          1.   this.response.write("<script>opener.location.reload();</script>");  

          2.   this.response.write("<script>opener.window.location.href = opener.window.location.href;</script>");   

          3.    Response.Write("<script language=javascript>opener.window.navigate(''你要刷新的頁.asp'');</script>")

          JS刷新框架的腳本語句

          //如何刷新包含該框架的頁面用  

          <script language=JavaScript>

              parent.location.reload();

          </script>   

          //子窗口刷新父窗口

          <script language=JavaScript>

               self.opener.location.reload();

          </script>

          ( 或 <a href="javascript:opener.location.reload()">刷新</a>    )

          //如何刷新另一個(gè)框架的頁面用  

          <script language=JavaScript>

              parent.otherFrameID.location.reload();

          </script>

          如果想關(guān)閉窗口時(shí)刷新或者想開窗時(shí)刷新的話,在<body>中調(diào)用以下語句即可。

          <body onload="opener.location.reload()"> 開窗時(shí)刷新

          <body onUnload="opener.location.reload()"> 關(guān)閉時(shí)刷新

          <script language="javascript">

          window.opener.document.location.reload()

          </script>

           

          Javascript刷新頁面(javascript refresh page)的幾種方法:

          1     history.go(0)

          2     location.reload()

          3     location=location

          4     location.assign(location)

          5     document.execCommand('Refresh')

          6     window.navigate(location)

          7     location.replace(location)

          8     document.URL=location.href

          自動(dòng)刷新頁面的方法:

          1.頁面自動(dòng)刷新:把如下代碼加入<head>區(qū)域中

          <meta http-equiv="refresh" content="20">

          其中20指每隔20秒刷新一次頁面.

          2.頁面自動(dòng)跳轉(zhuǎn):把如下代碼加入<head>區(qū)域中

          <meta http-equiv="refresh" content="20;url=http://www.wyxg.com">

          其中20指隔20秒後跳轉(zhuǎn)到http://www.wyxg.com頁面

          3.頁面自動(dòng)刷新js版

          <script language="JavaScript">

          function myrefresh()

          {

                  window.location.reload();

          }

          setTimeout('myrefresh()',1000); //指定1秒刷新一次

          </script>

          posted on 2012-08-01 20:11 ** 閱讀(221) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           

          導(dǎo)航

          統(tǒng)計(jì)

          公告

          你好!

          常用鏈接

          留言簿(2)

          隨筆檔案

          文章分類

          文章檔案

          新聞檔案

          相冊

          收藏夾

          C#學(xué)習(xí)

          友情鏈接

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 方正县| 沽源县| 托克托县| 邢台市| 孝义市| 博湖县| 聊城市| 灌云县| 新巴尔虎右旗| 耿马| 临安市| 安仁县| 毕节市| 贵定县| 镇远县| 永善县| 长沙市| 荔波县| 长宁县| 资中县| 永川市| 阜南县| 阿鲁科尔沁旗| 任丘市| 沧州市| 浪卡子县| 全南县| 西藏| 枣庄市| 苗栗县| 瓮安县| 秦皇岛市| 达州市| 静乐县| 华坪县| 马关县| 佛坪县| 永定县| 砀山县| 安吉县| 平阳县|