求高手帮我看一下错误出现哪里JavaScript

社区服务
高级搜索
猴岛论坛电脑百科求高手帮我看一下错误出现哪里JavaScript
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

[网络问题]求高手帮我看一下错误出现哪里JavaScript

楼层直达
小小小松松松

ZxID:18280296

等级: 列兵
举报 只看楼主 使用道具 楼主   发表于: 2012-06-02 0
    <SCRIPT LANGUAGE=JavaScript>

    <!--

    var scrollerwidth=508

    var scrollerheight=222

    var scrollerbgcolor='#ffffff'

    var num = 20

    var staytime='3000'

    var slidespeed='100'

    var slides=new Array()

    if (slides.length>1)

    i=2

    else

    i=0

    function move1(whichlayer){

    tlayer=eval(whichlayer)

    if (tlayer.top>0&&tlayer.top<=num){

    tlayer.top=0

    setTimeout("move1(tlayer)",staytime)

    setTimeout("move2(document.main.document.second)",staytime)

    return

    }

    if (tlayer.top>=tlayer.document.height*-1){

    tlayer.top-=num

    setTimeout("move1(tlayer)",slidespeed)

    }

    else{

    tlayer.top=scrollerheight

    tlayer.document.write(slides)

    tlayer.document.close()

    if (i==slides.length-1)

    i=0

    else

    i++

    }

    }

    function move2(whichlayer){

    tlayer2=eval(whichlayer)

    if (tlayer2.top>0&&tlayer2.top<=num){

    tlayer2.top=0

    setTimeout("move2(tlayer2)",staytime)

    setTimeout("move1(document.main.document.first)",staytime)

    return

    }

    if (tlayer2.top>=tlayer2.document.height*-1){

    tlayer2.top-=num

    setTimeout("move2(tlayer2)",slidespeed)

    }

    else{

    tlayer2.top=scrollerheight

    tlayer2.document.write(slides)

    tlayer2.document.close()

    if (i==slides.length-1)

    i=0

    else

    i++

    }

    }

    function move3(whichdiv){

    tdiv=eval(whichdiv)

    if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=num){

    tdiv.style.pixelTop=0

    setTimeout("move3(tdiv)",staytime)

    setTimeout("move4(second2)",staytime)

    return

    }

    if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){

    tdiv.style.pixelTop-=num

    setTimeout("move3(tdiv)",slidespeed)

    }

    else{

    tdiv.style.pixelTop=scrollerheight

    tdiv.innerHTML=slides

    if (i==slides.length-1)

    i=0

    else

    i++

    }

    }

    function move4(whichdiv){

    tdiv2=eval(whichdiv)

    if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=num){

    tdiv2.style.pixelTop=0

    setTimeout("move4(tdiv2)",staytime)

    setTimeout("move3(first2)",staytime)

    return

    }

    if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){

    tdiv2.style.pixelTop-=num

    setTimeout("move4(second2)",slidespeed)

    }

    else{

    tdiv2.style.pixelTop=scrollerheight

    tdiv2.innerHTML=slides

    if (i==slides.length-1)

    i=0

    else

    i++

    }}

    function startscroll(){

    if (document.all){

    move3(first2)

    second2.style.top=scrollerheight

    second2.style.visibility='visible'

    }

    else if (document.layers){

    document.main.visibility='show'

    move1(document.main.document.first)

    document.main.document.second.top=scrollerheight+num

    document.main.document.second.visibility='show'

    }}

    window.onload=startscroll

    //-->

    </SCRIPT>

    <SCRIPT LANGUAGE=JavaScript>

    <!--

    slides[0]='<a href=<%=bigurl%> target="_blank"><img src=<%=bigpic%> border="0" width="508" height="222"></a>'

    slides[1]='<a href=<%=bigpic2url%> target="_blank"><img src=<%=bigpic2%> border="0" width="508" height="222"></a>'

    slides[2]='<a href=<%=bigpic3url%> target="_blank"><img src=<%=bigpic3%> border="0" width="508" height="222"></a>'

    //-->

    </SCRIPT>

    <SCRIPT LANGUAGE=JavaScript>

    <!--

    if (document.all){

    document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+')">')

    document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')

    document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')

    document.write(slides[1])

    document.writeln('</div>')

    document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">')

    document.write(slides[2])

    document.writeln('</div></div></span>')

    }

    //-->

    </SCRIPT>

    问题补充:

    它只能显示第一张图片,后面的图片显示不出来,有的时候就是空白,有的时候提示是 undefined 不知道怎么回事,请个位不吝赐教,再次先谢过各位了。
« 返回列表
发帖 回复