最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js跑馬燈代碼(自寫)

 更新時(shí)間:2013年04月17日 11:44:04   作者:  
自己剛寫的一個(gè)小程序,寫得滿一般的,不過這個(gè)接口還成,感興趣的朋友可以參考下哈,希望對(duì)你學(xué)習(xí)js知識(shí)有所幫助
復(fù)制代碼 代碼如下:

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)}
}

自己剛寫的一個(gè)小程序,寫得滿一般的。。。。不過這個(gè)接口還成
復(fù)制代碼 代碼如下:

<script type="text/javascript" >
function show() {
var info = document.getElementById('Text1');
info.value = info.value.substr(1) + info.value[0];
}
setInterval(show, 500);
function show1() {
var info1 = document.getElementById('Text2');
info1.value = info1.value[info1.value.length-1] + info1.value.substr(0, info1.value.length-1);
}
setInterval(show1, 500);
</script>
<input id="Text1" type="text" value="歡迎來測(cè)試" />
<input id="Button1" type="button" value="滾動(dòng)"/><br />
<input id="Text2" type="text" value="北京歡迎您" />
<input id="Button2" type="button" value="滾動(dòng)" onclick="show1()" />

相關(guān)文章

最新評(píng)論

宝坻区| 宿迁市| 金昌市| 运城市| 上虞市| 松滋市| 嘉定区| 石河子市| 禄丰县| 内乡县| 交城县| 青海省| 胶州市| 邢台市| 郧西县| 江永县| 唐海县| 周宁县| 营山县| 岳池县| 竹溪县| 铜鼓县| 东安县| 株洲县| 青海省| 嘉定区| 房山区| 黄山市| 桐乡市| 宾阳县| 梓潼县| 陇川县| 滁州市| 桓仁| 广宗县| 祥云县| 巴南区| 徐汇区| 遂昌县| 靖远县| 新源县|