Home > Web Front-end > JS Tutorial > body text

js marquee code (self-written)_javascript skills

WBOY
Release: 2016-05-16 17:36:45
Original
1138 people have browsed it
Copy code The code is as follows:

function cls_marquee(id,id1,id2,sp){
this.obj_id=id;
this.obj_id1=id1;
this.obj_id2=id2;
this.speed=sp;
eval(this.obj_id2 ".innerHTML=" this.obj_id1 " .innerHTML");
function Marquee(){
if(eval(id2).offsetTop-eval(id).scrollTop<=0)
eval(id).scrollTop-=eval(id1) .offsetHeight
else{
eval(id).scrollTop
}
}
var MyMar=setInterval(Marquee,sp)
eval(this.obj_id).onmouseover=function( ) {clearInterval(MyMar)}
eval(this.obj_id).onmouseout=function() {MyMar=setInterval(Marquee,sp)}
}

One I just wrote The small program is generally written. . . . However, this interface is still
Copy code The code is as follows:


< input id="Text1" type="text" value="Welcome to test" />



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!