페이지 정보 스크롤 블록
6512 단어 JavaScripthtmlIE
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title> </title>
<!-- author:chendonghua -->
<!-- html IE -->
</head>
<body>
<div style="width:400px;"><font size="5" color="red">2009 666</font></div>
<div id="demo" style="overflow:hidden;width:320px; height:260px;float:none;border-style:dotted;">
<ul class="padding10" style="padding-top:5px; padding-bottom:5px;">
<li>
<div style="width:300px; float:left"> <span style="margin-left:15px;te"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">77 </span><span style="margin-left:15px;">620 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> - · </span></div><br>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">68 </span><span style="margin-left:15px;">600 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">58 </span><span style="margin-left:15px;">580 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">57 </span><span style="margin-left:15px;">450 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">50 </span><span style="margin-left:15px;">430 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">48 </span><span style="margin-left:15px;">420 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">81 </span><span style="margin-left:15px;">310 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;">KP- </span></div><br>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">76 </span><span style="margin-left:15px;">300 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> - </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">40 </span><span style="margin-left:15px;">280 </span></div>
<div class="clr"></div>
<div style="width:300px; float:left"> <span style="margin-left:15px;"> · </span></div>
<div style="float:left; width:300px;"> <span style="margin-left:15px;">88 </span><span style="margin-left:15px;">270 </span></div>
<div class="clr"></div>
</li>
</ul>
</div>
<script type="text/javascript">
function next(elem){
do{
elem=elem.nextSibling;
}while(elem&&elem.nodeType!=1);
return elem;
}
function first(elem){
elem=elem.firstChild;
return elem && elem.nodeType!=1?next(elem):elem;
}
var Marquee = {
init : function(id,speed){
this.speed = speed || 50;
this.boxID = id;
this.scrollBox = document.getElementById(id);
this.appendBox=first(this.scrollBox).cloneNode(true);
this.scrollBox.appendChild(this.appendBox);
this.objs = {
scrollBox : this.scrollBox,
appendBox : this.appendBox,
speed : this.speed,
id : this.boxID
};
return this;
},
scrollUp : function(){
var self = this.objs;
self.begin = function(){
self.doScr = setInterval(function(){
if(self['appendBox'].offsetHeight<=self['scrollBox'].scrollTop){
self['scrollBox'].scrollTop-=self['appendBox'].offsetHeight;
}else{
self['scrollBox'].scrollTop++;
}
},self.speed);
}
self.begin();
self.scrollBox.onmouseover = function(){
clearInterval(self.doScr);
}
self.scrollBox.onmouseout = function(){
self.begin();
}
}
}
Marquee.init("demo",50).scrollUp();
</script>
</body>
</html>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
기초 정리 - 1문자 (String) 숫자 (Number) 불린 (Boolean) null undefined 심볼 (Symbol) 큰정수 (BigInt) 따옴표로 묶어 있어야 함 Not-A-Number - 숫자 데이터 / 숫자로 표...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.