求教~如何循环~代码?
<P><FONT style="BACKGROUND-COLOR: #fbf1e1">怎么让下面的代码,红色部分循环播放?</FONT></P><P><FONT color=red><DIV style="LEFT: -0px; WIDTH: 1000px; POSITION: relative; TOP: 0px"></FONT></P>
<P><FONT color=red><IFRAME marginWidth=0 marginHeight=0 src="</FONT><A href="http://www.168cctv.net/attachment/7_885_7c4d8063fc18764.html"><FONT color=red>http://www.168cctv.net/attachment/7_885_7c4d8063fc18764.html</FONT></A><FONT color=red>" frameBorder=0 width=1000 scrolling=no height=600></IFRAME></DIV></FONT></P>
<P> </P>
<P><DIV id=font1<BR>style="Z-INDEX: 1; LEFT: 250px; WIDTH: 650px; POSITION: absolute; TOP: 50px; HEIGHT: 50px"><BR><marquee direction=left scrollAmount=3 ></P>
<P><FONT face=华文新魏 color=#8FBC8F<BR>size=5>《日 出》影 音画</FONT></marquee></DIV></P>
<P><t:transitionFilter id="a" targetElement="00" type="progid:DXImageTransform.Microsoft.GradientWipe(sProperties)"subtype="crossFade" mode="in" dur="5" autoreverse="false" repeatcount="indefinite"></t:transitionFilter><BR></DIV></DIV></TD></TR></TBODY></TABLE><BR><STYLE><BR>v\:*{behavior:url(#default#VML)}<BR>v\:textpath{font-family:华文新魏_gb2312;font-size:26px;v-text-align:left}<BR></STYLE><BR> <td></P>
<P><BODY><XMP id=xLyric style="DISPLAY: none"><BR><BR><BR></P>
<P><BR><BR><BR> <BR>《日出》<BR>演唱:林一心<BR>影~制作<BR>结束<BR>我们来不急完成的旅途<BR>这旅途失去了永驻<BR>...<BR>相识写到一半的书<BR>...<BR>结局没有记录<BR>我忍得住<BR>先哭的人未必比较痛苦<BR>你有朋友安抚<BR>谁来给我祝福<BR>我等待下一个日出<BR>照亮我灵魂最深处<BR>我得手握不住<BR>爱情的追逐<BR>我们的幸福<BR>我等待下一个日出<BR>回忆如果还有温度<BR>我愿用我的全部<BR>换你的回顾<BR>...<BR>追逐<BR>这一场失去意义的追逐<BR>却陷入遗憾的国度<BR>在我的眼前起得雾<BR>模糊所有出路<BR>我很羡慕<BR>你可以一边哭一边康复<BR>我那么多感触无法真情流露<BR>我等待下一个日出<BR>照亮我灵魂最深处<BR>我得手握不住爱情的追逐<BR>我们的幸福<BR>我等待下一个日出<BR>回忆如果还有温度<BR>我愿用我的全部<BR>换你的回顾<BR>我等待下一个日出<BR>照亮我灵魂最深处<BR>我得手握不住爱情的追逐<BR>我们的幸福<BR>我等待下一个日出<BR>回忆如果还有温度<BR>我愿用我的全部<BR>换你的回顾<BR>...<BR>我很在乎<BR>只是爱不等于能够相处<BR>你让我看清楚<BR>...<BR></XMP><BR><SCRIPT><BR>window.onerror=function(){return false}<BR>start()<BR>function start(){<BR> browser_ini()<BR> timer_ini()<BR> emv_ini()<BR> lrc.setData(oo("xLyric").innerHTML)<BR> lrc.write("歌曲载入中...","l")<BR> emv.play("<A href="http://99wma.dns.fssylmp3.cn:8221/21z/0/daodaily090520/1/3d0053211e39e749_1.wma">http://99wma.dns.fssylmp3.cn:8221/21z/0/daodaily090520/1/3d0053211e39e749_1.wma</A>")<BR>}<BR>function emv_ini(){<BR> var l<BR> window.emv={}<BR> lrc_ini()<BR> l="<div id=bxEmv style=position:absolute;left:12;top:0;width:1000;height:480>"<BR> l+="<div id=bxEmvScreen style=position:absolute;overflow:hidden;left:12;top:0;width:1000;height:580;background:url()>"<BR> l+="</div>"<BR> l+="</div>"<BR> l+="<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=mplayerwidth=0 height=0style=display:xnone;position:absolute;left:20;top:359><param name=PlayCount value=0><param name=ShowStatusBar value=-1><param name=Volume value=0></object>"<BR> insHtm(document.body,l)<BR> emv.play=function(url){oo("mplayer").FileName=url;oo("mplayer").Play()}<BR> emv.time=function(){<BR>var mPos<BR>var n1,o,len,w,per,n0,n1<BR>if(mplayer==null)<BR> return<BR>mPos=mplayer.CurrentPosition<BR>n=-1<BR>for(i=0;i<lrc.arr.length;i++){<BR> if(mPos<lrc.arr.slice(0,"|")*1)<BR> break<BR> n=i<BR>}<BR>if(n==-1)<BR> return<BR>if(lrc.i!=n){<BR> if(n==0)<BR> lrc.write(lrc.arr.slice("|"),"l")<BR> if(n!=lrc.i+1)<BR> lrc.write(lrc.arr.slice("|"),n%2==0?"l":"r")<BR> if(n<lrc.arr.length-1)<BR> lrc.write(lrc.arr.slice("|"),n%2==1?"l":"r")<BR> lrc.i=n<BR>}<BR>n0=lrc.arr.slice(0,"|")<BR>n1=lrc.arr.length>n+1?lrc.arr.slice(0,"|"):4<BR>o=oo("bxCaption_"+(n%2==0?"l":"r")+"_cover")<BR>len=o.time!=""?o.time*1:n1-n0<BR>per=(mPos-n0)/len<BR>for(i=0.001;i<1;i+=0.001){<BR> per1=lrc.getRealPos(o,i)<BR> if(per1>=per)<BR> break<BR>}<BR>o.style.width=o.width*i<BR> }<BR> timer.add("emv.time()")<BR>}<BR>function lrc_ini(){<BR> window.lrc={}<BR> lrc.wordPer=function(str,pos){<BR>return str.slice(0,pos).replace(/[^\x00-\xff]/g,"").length/str.replace(/[^\x00-\xff]/g,"").length<BR> }<BR> lrc.setData=function(str){<BR>var l,a,i,ad,n,j<BR>str=str.replace(/\|/g,"").replace(/\r\n/g,"\n")<BR>str=str.replace(/\[(\d\d)\:(\d\d)\.(\d\d)\]/g,function($0,$1,$2,$3){return ($1*60+$2*1+$3/100)+"|"})<BR>a=str.split("\n")<BR>lrc.arr=new Array()<BR>for(i=0;i<a.length;i++){<BR> ad=a.split("|")<BR> for(j=1;j<ad.length;j++){<BR> lrc.arr.add(ad+"|"+ad)<BR> }<BR>}<BR>lrc.i=-1<BR>sortIndex=0<BR>sortDir=1<BR>lrc.arr.sort(sortFoo)<BR> }<BR> lrc.getRealPos=function(obj,pos){<BR>var a=obj.path,zoom=obj.zoom,pos1=pos*zoom<BR>var a,i,ad<BR>for(i=0;i<a.length;i++){<BR> ad=a<BR> if(pos<=ad)<BR> continue<BR> if(pos>ad&&pos<=ad)<BR> pos1+=(zoom*ad-zoom)*(pos-ad)<BR> else<BR> pos1+=(zoom*ad-zoom)*(ad-ad)<BR> <BR>}<BR>return pos1<BR> }<BR> lrc.write=function(str,pos){<BR>var word=str,style=""<BR>var x,y,l,w,w1,o,a,i,ad<BR>if(/^\<.+\>/.test(str)){<BR> word=str.slice(">")<BR> style=str.slice(1).slice(0,">")<BR>}<BR>w=word.replace(/[^\x00-\xff]/g,"").length*13+2<BR>if(pos=="l"){<BR> x=40<BR> y=519<BR>}<BR>else{<BR> x=930-w<BR> y=519<BR>}<BR>l="<div id=bxCaption_"+pos+" style='position:absolute;left:"+x+";top:"+y+";width:"+w+";height:32;overflow:hidden'>"<BR>l+="<v:curve to=800,1 strokecolor=black strokeweight=3 style=position:absolute;top:14>"<BR>l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"<BR>l+="<v:curve to=800,1 strokecolor=#ffff00 fillcolor=#ffff00 strokeweight=1 style=position:absolute;top:14>"<BR>l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"<BR>l+="</div>"<BR>l+="<div id=bxCaption_"+pos+"_cover width="+w+" style=position:absolute;left:"+x+";top:"+y+";width:0;height:32;overflow:hidden>"<BR>l+="<v:curve to=800,1 strokecolor=white strokeweight=3 style=position:absolute;top:14>"<BR>l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"<BR>l+="<v:curve to=800,1 strokecolor=#ff0000 fillcolor=#ff0000 strokeweight=1 style=position:absolute;top:14>"<BR>l+="<v:path textpathok=t /><v:textpath on=t string='"+word+"' /></v:curve>"<BR>l+="</div>"<BR>odel("bxCaption_"+pos)<BR>odel("bxCaption_"+pos+"_cover")<BR>insHtm("bxEmvScreen",l)<BR>o=oo("bxCaption_"+pos+"_cover")<BR>o.time=style.get("time")<BR>o.path=new Array()<BR>len1=1<BR>a=style.split(";")<BR>for(i=0;i<a.length;i++){<BR> if(!/(\d+):(\d+)/.test(a))<BR> continue<BR> if(/(\d+)-(\d+):(\d+)/.test(a)){<BR> ad=/(\d+)-(\d+):(\d+)/.exec(a)<BR> ad=lrc.wordPer(word,ad-1)<BR> ad=lrc.wordPer(word,ad*1)<BR> ad=ad<BR> }<BR> else{<BR> ad=/(\d+):(.+)/.exec(a)<BR> ad=lrc.wordPer(word,ad-1)<BR> ad=lrc.wordPer(word,ad*1)<BR> }<BR> len1+=(ad-ad)*(ad-1)<BR> o.path.add(ad)<BR>}<BR>o.zoom=1/len1<BR> } <BR>}<BR>function browser_ini(){<BR> window.isIE=navigator.userAgent.indexOf("IE")>0<BR> window.isIE5=navigator.userAgent.indexOf("IE 5.0")>0<BR> String.prototype.trim=function(){return this.replace(/(^[\s]*)|([\s]*$)/g,"")}<BR> String.prototype.inc=function(s1,s2){if(s2==null){s2=","};return (s2+this+s2).indexOf(s2+s1+s2)>-1?true:false}<BR> String.prototype._slice="".slice<BR> String.prototype.slice=function(n1,n2){var v,b1=typeof(n1)=="number",b2=typeof(n2)=="number";if(!b1||typeof(n2)=="string"){v=eval("this._slice("+(b1?n1:this.indexOf(n1)+(n2==null?1:0)+(this.indexOf(n1)==-1?this.length:0))+(n2==null?"":(b2?n2:(this.indexOf(n2)==-1?"":","+this.indexOf(n2))))+")")}else{v=isIE5&&n1<0&&n2==null?this._slice(this.length-1):eval("this._slice(n1"+(n2==null?"":","+n2)+")")}return v}<BR> String.prototype.get=function(str,def){if(this.inc(str,";"))return 1;var a=this.match(new RegExp("(^|;)"+str+":[^;]*"));return a==null||str==""?(def==null?"":def):a.replace(";","").slice(str.length+1)}<BR> Array.prototype.add=function(key){this=key}<BR> window.oo=function(obj){return typeof(obj)=="string"?document.getElementById(obj):obj}<BR> window.insHtm=function(op,html,inEnd){op=oo(op);if(isIE){op.insertAdjacentHTML(inEnd==null?"beforeend":"afterbegin",html)}else{var r=op.ownerDocument.createRange();r.setStartBefore(op);eval("op."+(inEnd==null?"appendChild":"insertBefore")+"(r.createContextualFragment(html),op.firstChild)");}}<BR> window.odel=function(obj){if(oo(obj)!=null){oo(obj).parentNode.removeChild(oo(obj))}}<BR> if(!isIE){<BR> HTMLElement.prototype.contains=function(node){if(!node)return false;do if(node==this){return true}while(node=node.parentNode){return false}}<BR>Event.prototype.__defineGetter__("srcElement",function(){var node=this.target;while(node.nodeType!=1){node=node.parentNode}return node})<BR>Event.prototype.__defineGetter__("toElement",function(){return this.relatedTarget})<BR> }<BR>}<BR>function timer_ini(){<BR> window.timer={}<BR> timer.handle=null<BR> timer.queue=""<BR> timer.i=0<BR> timer.add=function(key){if(!timer.queue.inc(key,";")){timer.queue+=key+";"}}<BR> timer.del=function(key){timer.queue=move.queue.replace(key+";","")}<BR> timer.inv=function(){<BR>window.clearTimeout(timer.handle)<BR>eval(timer.queue)<BR>timer.i++<BR>timer.handle=window.setTimeout("timer.inv()",10)<BR> }<BR> timer.inv()<BR>}<BR>function sortFoo(v1,v2){<BR> var s1=v1.split("|"),s2=v2.split("|")<BR> if(!isNaN(s1)&&!isNaN(s2)){<BR>s1*=1<BR>s2*=1 }<BR> return (s1==s2?0:(s1>s2?1:-1))*sortDir<BR>}<BR></SCRIPT><BR><SCRIPT language=javascript><BR>function click() {if (event.button==2) {alert( '^_^ 谢谢欣赏 ^_^');}}document.onmousedown=click<BR></SCRIPT></P>
<P><script language="JavaScript"></P>
<P> var MESSAGE= " 影 音画 谢谢欣赏"</P>
<P> var POSITION = 150</P>
<P> var DELAY = 10</P>
<P> var scroll = new statusMessageObject()</P>
<P> function statusMessageObject(p,d) {</P>
<P>this.msg = MESSAGE</P>
<P>this.out = " "</P>
<P>this.pos = POSITION</P>
<P>this.delay = DELAY</P>
<P>this.i = 0</P>
<P>this.reset = clearMessage}</P>
<P>function clearMessage() {</P>
<P>this.pos = POSITION}</P>
<P>function scroller() {</P>
<P>for (scroll.i = 0; scroll.i < scroll.pos; scroll.i++) {</P>
<P> scroll.out += " "}</P>
<P>if (scroll.pos >= 0)</P>
<P> scroll.out += scroll.msg</P>
<P>else scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length)</P>
<P>window.status = scroll.out</P>
<P>scroll.out = " "</P>
<P>scroll.pos--</P>
<P>if (scroll.pos < -(scroll.msg.length)) {</P>
<P> scroll.reset()}</P>
<P>setTimeout ('scroller()',scroll.delay)}</P>
<P>function snapIn(jumpSpaces,position) {</P>
<P>var msg = scroll.msg</P>
<P>var out = ""</P>
<P>for (var i=0; i<position; i++) </P>
<P> {out += msg.charAt(i)}</P>
<P>for (i=1;i<jumpSpaces;i++) </P>
<P> {out += " "}</P>
<P>out += msg.charAt(position)</P>
<P>window.status = out</P>
<P>if (jumpSpaces <= 1) {</P>
<P> position++</P>
<P> if (msg.charAt(position) == ' ') </P>
<P> {position++ }</P>
<P> jumpSpaces = 100-position</P>
<P>} else if (jumpSpaces >3)</P>
<P> {jumpSpaces *= .75}</P>
<P>else</P>
<P> {jumpSpaces--}</P>
<P>if (position != msg.length) {</P>
<P> var cmd = "snapIn(" + jumpSpaces + "," + position + ")";</P>
<P> scrollID = window.setTimeout(cmd,scroll.delay);</P>
<P>} else { window.status=""</P>
<P> jumpSpaces=0</P>
<P> position=0</P>
<P> cmd = "snapIn(" + jumpSpaces + "," + position + ")";</P>
<P> scrollID = window.setTimeout(cmd,scroll.delay);</P>
<P> return false }</P>
<P>return true}</P>
<P>snapIn(100,0);</P>
<P></script> </P> 请高手们来帮忙回答下吧,傲雪姐姐他们应该都会。 不知是不是将scrolling=no 改为scrolling=yes,楼主试试吧 新来的 正在慢慢学习~
回复 4# 的帖子
欢迎新朋友~
页:
[1]