<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
????<head>
????<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
????<script type="text/javascript" ????src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
????<script type="text/javascript">
????//怎么獲取網(wǎng)頁的高度 讓頁面一出來就滾動條在最底端
????function myScroll()
????{
????//前邊是獲取chrome等一般瀏覽器 如果獲取不到就是ie了 就用ie的辦法獲取
????var x=document.body.scrollTop||document.documentElement.scrollTop;
????var timer=setInterval(function(){
????x=x-100;
????if(x<100)
????{
????x=0;
????window.scrollTo(x,x);
????clearInterval(timer);
????}
????window.scrollTo(x,x);
????},"250");
????}
????</script>
????<title>回到頂部</title>
????</head>
????<body id="bd">
????<div>
????<div style="height:1000px;">content</div>
????<div style="height:1000px">
????<div style="position:fixed;right:50px;bottom:50px;width:60px;height:60px;background-color:red;cursor:hand;"
????onclick="myScroll()">Return Top</div>
????</div>
????</body>
</html>
今天準備慢慢將之前分散在各平臺的文章全部遷移至一起來睡毒,所以來測試簡書對代碼的友好度,看來確實不是很好,相比技術(shù)類平臺差好多。但是就是當(dāng)初多看了那一眼,戀上了簡書叁扫,怎么辦。
CSDN鏈接:https://blog.csdn.net/roc1029/article/details/15500263