小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

Js刷新大全、刷新網(wǎng)頁

 樹風(fēng) 2011-03-17
Js刷新大全、刷新網(wǎng)頁
 
         基本上所有要求自動刷新頁面的代碼都有,大家可以自由發(fā)揮做出完美的頁面。

1) 10表示間隔10秒刷新一次

2)<script>window.location.reload(true);</script>如果是你要刷新某一個iframe就把window給換成frame的名字或ID號

3)<script>window.navigate("本頁面url");</script>

4)

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

定時刷新:

1,<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,<!--sponse.redirect ur-->

說明:一般用一個url參數(shù)或者表單傳值判斷是否發(fā)生某個操作,然后利用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í)現(xiàn) 有三種方法:

1,在html中設(shè)置:之後加入下面這一行即可!定時刷新:10代表刷新間隔,單位為秒

2.jsp<!--esponse.setHeader("refresh","1");-->每一秒刷新一次

3.使用javascript:<script>setTimeout("self.location.reload();",1000);<script>一秒一次

頁面自動跳轉(zhuǎn):

<script>window.location.href="mian.aspx";history.go(0);//window.close();   //關(guān)閉瀏覽器此頁的窗口</script>

先來看一個簡單的例子:下面以三個頁面分別命名為frame.html、top.html、bottom.html為例來具體說明如何做。

frame.html 由上(top.html)下(bottom.html)兩個頁面組成,代碼如下:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><TITLE> frame </TITLE></HEAD><frameset rows="50%,50%"><frame href="http://www./">http://www.頁面

3.頁面自動刷新js版<script language="JavaScript">function myrefresh(){     window.location.reload();}setTimeout('myrefresh()',1000); //指定1秒刷新一次</script>

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()">刷新    )

//如何刷新另一個框架的頁面用 <script language=JavaScript>parent.另一FrameID.location.reload();</script>

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

<body onload="opener.location.reload()"> 開窗時刷新<body onUnload="opener.location.reload()"> 關(guān)閉時刷新<script language="javascript">window.opener.document.location.reload()</script>

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多