• <em id="6vhwh"><rt id="6vhwh"></rt></em>

    <style id="6vhwh"></style>

    <style id="6vhwh"></style>
    1. <style id="6vhwh"></style>
        <sub id="6vhwh"><p id="6vhwh"></p></sub>
        <p id="6vhwh"></p>
          1. 国产亚洲欧洲av综合一区二区三区 ,色爱综合另类图片av,亚洲av免费成人在线,久久热在线视频精品视频,成在人线av无码免费,国产精品一区二区久久毛片,亚洲精品成人片在线观看精品字幕 ,久久亚洲精品成人av秋霞

            回到頂部代碼(回到頂部代碼js)

            更新時間:2023-03-02 09:45:27 閱讀: 評論:0

            JS代碼:

            <script type="text/javascript">

            var urAgent = navigator.urAgent.toLowerCa();

            var browr =

            (browr = urAgent.match(/qqbrowr/([d.]+)/))?"qqbrowr/"+browr[1]:

            (browr = urAgent.match(/s+2.x/))?"sogou/2.x": //sougou

            (browr = urAgent.match(/msies+([d.]+)/))?"msie/"+browr[1]: //ie

            (browr = urAgent.match(/chrome/([d.]+)/))?"chrome/"+browr[1]: //chrome

            (browr = urAgent.match(/firefox/([d.]+)/))?"firefox/"+browr[1]: //firefox

            (browr = urAgent.match(/version/([d.]+)s+safari/([d.]+)/))?"safari/"+browr[1]: //safari

            (browr = urAgent.match(/opera/([d.]+)([wW]+)version/([d.]+)/))?"opera/"+browr[3]: //opera

            "other browr";

            var browr4 = browr.substr(0,2);

            //實現回到頁面頂部

            function goTopEx(){

            var obj=document.getElementById("goTopBtn");

            var obj2=document.getElementById("shangy");

            var obj3=document.getElementById("xiay");

            var obj4=document.getElementById("goBottom");

            function getScrollTop(){

            if(browr4=="ch"){

            //谷歌瀏覽器

            return document.body.scrollTop;

            }el{

            //IE、firefox等瀏覽器

            return document.documentElement.scrollTop;

            }

            }

            function tScrollTop(value){

            if(browr4=="ch"){

            //谷歌瀏覽器

            document.body.scrollTop=value;

            }el{

            //IE、firefox等瀏覽器

            document.documentElement.scrollTop=value;

            }

            }

            window.onscroll=function(){getScrollTop()>50?obj.style.display="":obj.style.display="none";

            getScrollTop()>100?obj2.style.display="":obj2.style.display="none";

            document.body.clientHeight-getScrollTop()>650?obj3.style.display="":obj3.style.display="none";

            document.body.clientHeight-getScrollTop()>650?obj4.style.display="":obj4.style.display="none";

            }

            obj.onclick=function(){

            var goTop=tInterval(scrollMove,10);

            function scrollMove(){

            tScrollTop(getScrollTop()/1.1);

            if(getScrollTop()<1)clearInterval(goTop);

            }

            }

            }

            function downn(){

            if(browr4=="ch"){

            //谷歌瀏覽器

            window.scrollBy(0,document.body.clientHeight);

            }el{

            //IE、firefox等瀏覽器

            window.scrollBy(0,document.documentElement.clientHeight);

            }

            }

            </script>

            CSS代碼:

            <style type="text/css">

            #tbrowr a:link,.container a:visited{

            font-size:18px;

            text-decoration:none;

            }

            .container{

            font-size:1.2em;

            margin:auto;

            font-family:"宋體";

            width:75.29%;

            line-height:1.6em;

            }

            P{

            margin-top:16px;

            margin-bottom:16px;

            text-indent:2em;

            }

            .uls{

            color:#CC6666;

            font-weight:bold;

            }

            .uls>ol{

            list-style:none;

            font-weight:normal;

            list-style:lower-latin;

            color:#000000;

            line-height:1.3em;

            }

            h2{

            font-size:20px;

            font-weight:bold;

            margin-top:15px;

            margin-bottom:0px;

            text-indent:0em;

            }

            #goTopBtn, #goBottom, #shangy, #xiay{

            width: 18px;

            line-height: 1.2;

            padding: 5px 0;

            font-size: 12px;

            text-align: center;

            position: fixed;

            right: 10px;

            cursor: pointer;

            filter: Alpha(opacity=30);

            opacity=.3;

            }

            #goTopBtn, #goBottom {

            background-color:#aaa;

            color:#000;

            }

            #shangy, #xiay{

            background-color: #ccc;

            color: #000;

            }

            #goTopBtn{

            bottom: 105px;

            }

            #goBottom {

            bottom: 30px;

            }

            #shangy {

            bottom: 80px;

            }

            #xiay {

            bottom: 55px;

            }

            #goTopBtn:hover, #goBottom:hover, #shangy:hover, #xiay:hover{

            background-color:#ddd;

            border:#ccc 0px solid;

            }

            #goTopBtn a:link, #goBottom a:link, #xiay a:link, #shangy a:link {

            text-decoration: none;

            color:white;

            }

            img{

            margin-right:2em;

            text-indent:2em;

            border:0;

            }

            .picsay{

            color:#930;

            font-size:90%;

            line-height:110%;

            margin-top:-12px;

            padding:0;

            }

            .remark{

            color:#930;

            font-size:90%;

            line-height:140%;

            margin-top:-12px;

            text-indent:0em;

            padding:0;

            }

            .ref{

            color:#930;

            font-size:95%;

            line-height:150%;

            margin-top:-12px;

            text-indent:2em;

            padding:0;

            }

            .code0, .code2, .code4{

            font-size:90%;

            line-height:110%;

            margin-top:-12px;

            padding:0;

            }

            .code0{

            color:red;

            text-indent:0em;

            }

            .code2{

            color:#930;

            text-indent:2em;

            }

            .code4{

            color:blue;

            text-indent:4em;

            }

            sub,sup{

            font-size:80%;

            color:red;

            }

            </style>

            HTML代碼:

            <body>

            ……

            <div style="display:none" id="goTopBtn">

            <a href="javascript:void(null)" target="_lf">&and;</div>

            <div style="display:none" id="shangy">

            <a href="javascript:void(null)" onclick="shangy()" target="_lf">&uarr;</a></div>

            <div id="xiay">

            <a href="javascript:void(null)" onclick="xiay()" target="_lf">&darr;</a></div>

            <div id="goBottom">

            <a href="javascript:void(null)" onclick="downn()" target="_lf">&or;</a></div>

            <SCRIPT type=text/javascript>

            goTopEx();

            function xiay(){

            window.scrollBy(0,window.innerHeight);

            }

            function shangy(){

            window.scrollBy(0,-window.innerHeight);

            }

            </script>

            </body>

            </body>

            關鍵在于控制以下一些對象及屬性:

            inner:測量的是一個窗口的活動文檔區(以稱為內容區)的高和寬;

            outer:測量的是整個窗口的外邊界;包括任何顯示在窗口中的東西:滾動條、狀態欄等;

            網頁可見區域寬: document.body.offtWidth (包括邊線的寬)

            網頁可見區域高: document.body.offtHeight (包括邊線的高)

            網頁正文全文寬: document.body.scrollWidth

            網頁正文全文高: document.body.scrollHeight

            網頁被卷去的高: document.body.scrollTop

            網頁被卷去的左: document.body.scrollLeft

            網頁正文部分上: window.screenTop

            網頁正文部分左: window.screenLeft

            屏幕分辨率的高: window.screen.height

            屏幕分辨率的寬: window.screen.width

            屏幕可用工作區高度: window.screen.availHeight

            屏幕可用工作區寬度: window.screen.availWidth

            HTML精確定位:scrollLeft,scrollWidth,clientWidth,offtWidth

            scrollHeight: 獲取對象的滾動高度。

            scrollLeft:設置或獲取位于對象左邊界和窗口中目前可見內容的最左端之間的距離

            scrollTop:設置或獲取位于對象最頂端和窗口中可見內容的最頂端之間的距離

            scrollWidth:獲取對象的滾動寬度

            offtHeight:獲取對象相對于版面或由父坐標 offtParent 屬性指定的父坐標的高度

            offtLeft:獲取對象相對于版面或由 offtParent 屬性指定的父坐標的計算左側位置

            offtTop:獲取對象相對于版面或由 offtTop 屬性指定的父坐標的計算頂端位置

            event.clientX 相對文檔的水平座標

            event.clientY 相對文檔的垂直座標

            event.offtX 相對容器的水平坐標

            event.offtY 相對容器的垂直坐標

            document.documentElement.scrollTop 垂直方向滾動的值

            event.clientX+document.documentElement.scrollTop 相對文檔的水平座標+垂直方向滾動的量

            -End-

            本文發布于:2023-02-28 21:04:00,感謝您對本站的認可!

            本文鏈接:http://www.newhan.cn/zhishi/a/167772152798037.html

            版權聲明:本站內容均來自互聯網,僅供演示用,請勿用于商業和其他非法用途。如果侵犯了您的權益請與我們聯系,我們將在24小時內刪除。

            本文word下載地址:回到頂部代碼(回到頂部代碼js).doc

            本文 PDF 下載地址:回到頂部代碼(回到頂部代碼js).pdf

            標簽:代碼   js
            相關文章
            留言與評論(共有 0 條評論)
               
            驗證碼:
            Copyright ?2019-2022 Comsenz Inc.Powered by ? 實用文體寫作網旗下知識大全大全欄目是一個全百科類寶庫! 優秀范文|法律文書|專利查詢|
            主站蜘蛛池模板: 亚洲欧美综合人成野草| 国产成人AV无码精品天堂| 日韩黄色av一区二区三区| 最近中文字幕日韩有码| 成人国产精品一区二区网站公司| 国产AV福利第一精品| 国产亚洲色视频在线| 久久久久香蕉国产线看观看伊 | 国产精品成人综合色在线| 欧美成人h亚洲综合在线观看| 99久久久无码国产麻豆| 狠狠综合久久av一区二| 国产一级黄色片在线观看| 国产精品一区二区麻豆蜜桃| 国产综合av一区二区三区| 国产gaysexchina男外卖| 日韩精品一区二区三区四| 九九热视频在线观看视频| 中文字幕人妻精品在线| 老太脱裤子让老头玩xxxxx| 国产成人亚洲综合图区| 另类 亚洲 图片 激情 欧美| 风流少妇树林打野战视频| 国产亚洲欧洲av综合一区二区三区| 成年黄页网站大全免费无码| 日韩中文免费一区二区| 性做久久久久久久久| 挺进朋友人妻雪白的身体韩国电影 | 久久 午夜福利 张柏芝| 在线观看无码av免费不卡网站| 国产乱子伦精品免费视频| 久久久无码精品国产一区| 欧美19综合中文字幕| 国产91特黄特色A级毛片| 亚洲成年av天堂动漫网站| 免费国产va在线观看| 成人亚洲一区二区三区在线| 一级片一区二区中文字幕| 亚洲欧美人成电影在线观看| 深夜免费av在线观看| 亚洲国产欧美一区二区好看电影 |