<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    tinguo002

     

    iframe 刷新

    JS實現刷新iframe的方法



    <iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe>


    方案一:用iframe的name屬性定位


    <input type="button" name="Button"
    value="Button"
    onclick="document.frames('ifrmname').location.reload()">


      或


    <input type="button" name="Button"
    value="Button"
    onclick="document.all.ifrmname.document.location.reload()">


      方案二:用iframe的id屬性定位


    <input type="button" name="Button"
    value="Button"
    onclick="ifrmid.window.location.reload()">


      終極方案:當iframe的src為其它網站地址(跨域操作時)


    <input type="button" name="Button"
    value="Button"
    onclick="window.open(document.all.ifrmname.src,'ifrmname','')">





    代碼如下:<input type=button value=刷新 onclick="history.go(0)">


    代碼如下:<input type=button value=刷新 onclick="location.reload()">


    代碼如下:<input type=button value=刷新 onclick="location=location">


    代碼如下:<input type=button value=刷新
    onclick="window.navigate(location)">


    代碼如下:<input type=button value=刷新 onclick="location.replace(location)">


    下面這三種我就不知道該怎么用了,就把代碼放在下面吧,哪位要是會的話,可教教大家。


    <input type=button value=刷新
    onclick="document.execCommand(@#Refresh@#)">


    <input type=button value=刷新
    onclick="window.open(@#自身的文件@#,@#_self@#)">


    <input type=button value=刷新 onClick=document.all.WebBrowser.ExecWB(22,1)>






    父頁面中存在兩個iframe,一個iframe中是一個鏈接列表,其中的鏈接指向另一個iframe,用于顯示內容?,F在當內容內容添加后,在鏈接列表中添加了一條記錄,則需要刷新列表iframe。


    在內容iframe的提交js中使用parent.location.reload()將父頁面全部刷新,因為另一個iframe沒有默認的url,只能通過列表選擇,所以只顯示了列表iframe的內容。


    使用window.parent.frames["列表iframe名字"].location="列表url"即可進刷新列表iframe,而內容iframe在提交后自己的刷新將不受影響。








    document.frames("refreshAlarm").location.reload(true); //ok


    document.frames("refreshAlarm").document.location.reload(true); //ok


    document.frames("refreshAlarm").document.location="/public/alarmsum.asp";//ok


    document.getElementByIdx_x("refreshAlarm").src="/public/alarmsum.asp"
    mce_src="/public/alarmsum.asp"; //ok


    document.frames("refreshAlarm").src="/public/alarmsum.asp"
    mce_src="/public/alarmsum.asp"; //沒變化,沒動靜


    注意區別,document.all.refreshAlarm 或 document.frames("refreshAlarm")
    得到的是information.asp頁面中那個iframe標簽,所以對src屬性操作有用。
    document.frames("refreshAlarm").document得到iframe里面的內容,也就是"/public/alarmsum.asp"中的內容。


    這里需要補充說明的是:


    采用document.getElementByIdx_x獲取后reload是不可以的


    但是可以這樣


    var myiframe = document.getElementByIdx_x("iframe1");


    myiframe.src = myiframe.src; //這樣同樣可以起到刷新的效果。



    自動刷新頁面



    javascript(js)自動刷新頁面的實現方法總結2008-04-18 13:24
    自動刷新頁面的實現方法總結:


    1)
    <meta
    http-equiv="refresh"content="10;url=跳轉的頁面">
    10表示間隔10秒刷新一次
    2)
    <script
    language=''javascript''>
    window.location.reload(true);
    </script>
    如果是你要刷新某一個iframe就把window給換成frame的名字或ID號
    3)
    <script
    language=''javascript''>
    window.navigate("本頁面url");
    </script>
    4>


    function
    abc()
    {
    window.location.href="/blog/window.location.href";
    setTimeout("abc()",10000);
    }


    刷新本頁:
    Response.Write("<script
    language=javascript>window.location.href=window.location.href;</script>")


    刷新父頁:
    Response.Write("<script
    language=javascript>opener.location.href=opener.location.href;</script>")


    轉到指定頁:
    Response.Write("<script
    language=javascript>window.location.href='yourpage.aspx';</script>")



    刷新頁面實現方式總結(HTML,ASP,JS)
    'by aloxy


    定時刷新:
    1,<script>setTimeout("location.href='url'",2000)</script>


    說明:url是要刷新的頁面URL地址
    2000是等待時間=2秒,


    2,<meta name="Refresh" content="n;url">


    說明:
    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,<%response.redirect url%>


    說明:一般用一個url參數或者表單傳值判斷是否發生某個操作,然后利用response.redirect 刷新。


    4,刷新框架頁
       〈script
    language=javascript>top.leftFrm.location.reload();parent.frmTop.location.reload();</script〉


    彈出窗體后再刷新的問題



    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中加入<base target="_self"/>


    刷新的內容加在    if (!IsPostBack) 中


    在框架頁中右面刷新左面
        //刷新框架頁左半部分
        Response.Write("<script
    language=javascript>");
       
    Response.Write("parent.left.location.href='PayDetailManage_Left.aspx'");
       
    Response.Write("</script>");



    頁面定時刷新功能實現


    有三種方法:
    1,在html中設置:
    <title>xxxxx</title>之後加入下面這一行即可!
    定時刷新:<META
    HTTP-EQUIV="Refresh" content="10">
    10代表刷新間隔,單位為秒


    2.jsp
    <% response.setHeader("refresh","1"); %>
    每一秒刷新一次


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



    頁面自動跳轉:
    1,在html中設置:
    <title>xxxxx</title>之後加入下面這一行即可!
    定時跳轉并刷新:<meta
    http-equiv="refresh"
    content="20;url=http://自己的URL">,
    其中20指隔20秒后跳轉到http://自己的URL 頁面。



    點擊按鈕提交表單后刷新上級窗口


    A窗口打開B窗口


    然后在B里面提交數據至C窗口


    最后要刷新A窗口


    并且關閉B窗口


    幾個javascript函數


    //第一個自動關閉窗口
    <script language="javascript">
    <!--
    function
    clock(){i=i-1
    document.title="本窗口將在"+i+"秒后自動關閉!";
    if(i>0)setTimeout("clock();",1000);
    else
    self.close();}
    var i=2
    clock();
    //-->
    </script>


    //第二個刷新父頁面的函數


    <script
    language="javascript">
    opener.location.reload();
    </script>



    //第三個打開窗口


    <script language="javascript">
    function
    show(mylink,mytitle,width,height)
    {mailwin=window.open(mylink,mytitle,'top=350,left=460,width='+width+',height='+height+',scrollbars=no')}
    </script>



    歡迎大家訪問我的個人網站 萌萌的IT人

    posted on 2013-06-02 21:39 一堣而安 閱讀(643) 評論(0)  編輯  收藏


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


    網站導航:
     

    導航

    統計

    常用鏈接

    留言簿(1)

    隨筆分類

    隨筆檔案

    收藏夾

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲日韩区在线电影| 亚洲另类无码专区首页| 18禁免费无码无遮挡不卡网站| 亚洲fuli在线观看| 国产又黄又爽又猛的免费视频播放| 国产日韩在线视频免费播放| 亚洲网址在线观看你懂的| 成人毛片免费观看视频大全| 两性色午夜视频免费网| 亚洲国产电影在线观看| 亚洲视频一区二区在线观看| 啦啦啦www免费视频| 国产啪精品视频网站免费尤物| 亚洲色偷偷av男人的天堂| 免费永久在线观看黄网站| 午夜网站在线观看免费完整高清观看 | 最近中文字幕免费完整| 看亚洲a级一级毛片| 久久久久亚洲AV成人片| 又色又污又黄无遮挡的免费视| 亚洲a一级免费视频| 亚洲a无码综合a国产av中文| 久久精品国产亚洲av水果派| 波多野结衣一区二区免费视频| 四虎在线视频免费观看视频| 国产精品美女久久久免费 | 最近中文字幕免费mv视频8| 国产做国产爱免费视频| 亚洲AⅤ男人的天堂在线观看| 亚洲一区二区电影| 国产亚洲精品激情都市| 日韩激情淫片免费看| 亚洲免费中文字幕| 国产午夜不卡AV免费| 色屁屁www影院免费观看视频| 亚洲av无码专区在线| 亚洲国产一区二区三区青草影视| 亚洲成a人片在线播放| 午夜免费福利在线| 在人线av无码免费高潮喷水| 97在线视频免费|