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

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

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

    Jcat
    寵辱不驚,閑看庭前花開(kāi)花落~~
    posts - 173,comments - 67,trackbacks - 0
    功能:5秒后,自動(dòng)跳轉(zhuǎn)到同目錄下的02view.html文件
    ?
    1)html的實(shí)現(xiàn)
    <head>
    <meta?http-equiv="refresh"?content="5;url=02view.html">
    </head>

    優(yōu)點(diǎn):簡(jiǎn)單
    缺點(diǎn):Struts Tiles中無(wú)法使用
    ?
    2)javascript的實(shí)現(xiàn)
    <script?language="javascript"?type="text/javascript">
    ?? setTimeout(
    "javascript:location.href='02view.html'",?5000);?
    </script>

    優(yōu)點(diǎn):靈活,可以結(jié)合更多的其他功能
    缺點(diǎn):受到不同瀏覽器的影響
    ?
    3)結(jié)合了倒數(shù)的javascript實(shí)現(xiàn)(IE)
    <span?id="totalSecond">5</span>

    <script?language="javascript"?type="text/javascript">
    var?second?=?totalSecond.innerText;
    setInterval(
    "redirect()",?1000);
    function?redirect(){?
    totalSecond.innerText
    =--second;?
    if(second<0)?location.href='02view.html';
    }
    </script>

    優(yōu)點(diǎn):更人性化
    缺點(diǎn):firefox不支持(firefox不支持span、div等的innerText屬性)
    ?
    3')結(jié)合了倒數(shù)的javascript實(shí)現(xiàn)(firefox)
    <script?language="javascript"?type="text/javascript">
    ????
    var?second?=?document.getElementById('totalSecond').textContent;
    ????setInterval(
    "redirect()",?1000);
    ????
    function?redirect()
    ????{
    ????????document.getElementById('totalSecond').textContent?
    =?--second;
    ????????
    if?(second?<?0)?location.href?=?'02view.html';
    ????}
    </script>

    4)解決Firefox不支持innerText的問(wèn)題
    <span?id="totalSecond">5</span>

    <script?language="javascript"?type="text/javascript">
    if(navigator.appName.indexOf("Explorer")?>?-1){
    ????document.getElementById('totalSecond').innerText?
    =?"my?text?innerText";
    }?
    else{
    ????document.getElementById('totalSecond').textContent?
    =?"my?text?textContent";
    }
    </script>

    5)整合3)和3')
    <span?id="totalSecond">5</span>

    <script?language="javascript"?type="text/javascript">
    ????
    var?second?=?document.getElementById('totalSecond').textContent;

    ????
    if?(navigator.appName.indexOf("Explorer")?>?-1)
    ????{
    ????????second?
    =?document.getElementById('totalSecond').innerText;
    ????}?
    else
    ????{
    ????????second?
    =?document.getElementById('totalSecond').textContent;
    ????}


    ????setInterval(
    "redirect()",?1000);
    ????
    function?redirect()
    ????{
    ????????
    if?(second?<?0)
    ????????{
    ????????????location.href?
    =?'02view.html';
    ????????}?
    else
    ????????{
    ????????????
    if?(navigator.appName.indexOf("Explorer")?>?-1)
    ????????????{
    ????????????????document.getElementById('totalSecond').innerText?
    =?second--;
    ????????????}?
    else
    ????????????{
    ????????????????document.getElementById('totalSecond').textContent?
    =?second--;
    ????????????}
    ????????}
    ????}
    </script>
    posted on 2006-11-22 17:20 Jcat 閱讀(16871) 評(píng)論(2)  編輯  收藏 所屬分類: Java

    FeedBack:
    # re: 一些頁(yè)面自動(dòng)跳轉(zhuǎn)的實(shí)現(xiàn)[未登錄](méi)
    2008-07-19 10:25 | jimmy
    好東東,謝謝樓主分享,解決了我的問(wèn)題。  回復(fù)  更多評(píng)論
      
    # re: 一些頁(yè)面自動(dòng)跳轉(zhuǎn)的實(shí)現(xiàn)[未登錄](méi)
    2010-12-30 12:42 | jake
    很好,謝謝LZ總結(jié)了。  回復(fù)  更多評(píng)論
      
    主站蜘蛛池模板: 亚洲精品国产福利片| 两个人看的www高清免费视频| 免费一级毛片在线播放视频| 亚洲国产成人无码AV在线影院 | 亚洲精品无码鲁网中文电影| 四色在线精品免费观看| 麻豆高清免费国产一区| 三级黄色免费观看| 免费又黄又爽又猛大片午夜| 亚洲色偷偷综合亚洲av78| 亚洲美女大bbbbbbbbb| 亚洲色成人网站WWW永久| 99久久久国产精品免费蜜臀| 成人毛片100免费观看| 亚洲国产精品专区| 凹凸精品视频分类国产品免费| 成人免费av一区二区三区| 亚洲剧情在线观看| 4480yy私人影院亚洲| 四虎影库久免费视频| 久久青草国产免费观看| 中文字幕免费播放| 黄视频在线观看免费| www成人免费观看网站| 国产精品hd免费观看| h片在线播放免费高清| 一级毛片免费播放试看60分钟| 亚洲国产成人久久99精品| 亚洲av午夜福利精品一区| 亚洲AV无码国产精品色午友在线 | 亚洲午夜无码久久久久小说 | 亚洲黄色网址大全| 男人的天堂亚洲一区二区三区 | 成在人线AV无码免费| 伊人免费在线观看高清版| 亚欧洲精品在线视频免费观看| 亚洲首页国产精品丝袜| 2020天堂在线亚洲精品专区| 亚洲第一极品精品无码久久 | 国产精品免费久久久久影院| 一区免费在线观看|