From 2012.igem.org
(Difference between revisions)
|
|
(One intermediate revision not shown) |
Line 1: |
Line 1: |
- | <html xmlns="http://www.w3.org/1999/xhtml">
| |
- | <head>
| |
| | | |
- | <STYLE type=text/css>
| |
- | BODY {
| |
- | HEIGHT: 3600px;
| |
- | }
| |
- | #goTopBtn {
| |
- | POSITION: fixed; TEXT-ALIGN: center; LINE-HEIGHT: 30px; WIDTH: 30px; BOTTOM: 35px; HEIGHT: 33px; FONT-SIZE: 12px; CURSOR: pointer; RIGHT: 0px; _position: absolute; _right: auto
| |
- | }
| |
- |
| |
- | </style>
| |
- | <SCRIPT type=text/javascript>
| |
- | // JavaScript Document
| |
- | function goTopEx(){
| |
- | var obj=document.getElementById("goTopBtn");
| |
- | function getScrollTop(){
| |
- | return document.documentElement.scrollTop;
| |
- | }
| |
- | function setScrollTop(value){
| |
- | document.documentElement.scrollTop=value;
| |
- | }
| |
- | window.onscroll=function(){getScrollTop()>0?obj.style.display="":obj.style.display="none";}
| |
- | obj.onclick=function(){
| |
- | var goTop=setInterval(scrollMove,10);
| |
- | function scrollMove(){
| |
- | setScrollTop(getScrollTop()/1.1);
| |
- | if(getScrollTop()<1)clearInterval(goTop);
| |
- | }
| |
- | }
| |
- | }
| |
- | </script>
| |
- | </head>
| |
- |
| |
- | <body style="text-align:center">
| |
- |
| |
- | <DIV style="DISPLAY: none" id=goTopBtn><IMG border=0 src="https://static.igem.org/mediawiki/2012/1/1d/Lanren_top.jpg"></DIV>
| |
- |
| |
- |
| |
- |
| |
- | <SCRIPT type=text/javascript>goTopEx();</SCRIPT>
| |
- |
| |
- |
| |
- | </body>
| |
- | </html>
| |
Latest revision as of 05:49, 22 September 2012