保存为1.txt
text = new Array(14); 
text[0] ='asdgagadg'       
text[1] ='sdagggggggggggggggggggggggggggggggggggggggggggggggg!' 
text[2] ='gggggggggggggggggggggggggggggggggggggggggggggg,'
text[3] ='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa。'      
text[4] ='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'     
text[5] ='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' 
text[6] ='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj。' 
text[7] ='rtrrrrrrrrrrrrrrrrrrrrrrr' 
text[8] ='“ttttttttttttttttttttttttttttt。”' 
text[9] ='eeeeeeeeeeeeeeeeeeeeee,'
text[10]='tttttttttttttttttttttttttt。 '
text[11]='为ttttttttttttttttttttttttttttttttttttttt '
text[12]='mmmmmmmmmmmmmmmmmmmmmmm '
text[13]='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr '
text[14]='ttttttttttttttttttttttttttttttttt '调用方法:
<script language="javascript" src="1.txt"></script>

解决方案 »

  1.   

    哪位大侠知道,请告知如何做,主要是做成txt好修改和追加,也不用改网页文件。
      

  2.   

    嗯,我试了一下
    你把数组名由text改成txt就可以了,调用方法和我第一个帖子一样!ps:起始,把那一部分保存成单独的js文件,和文本文件的管理方法一样的,好修改和追加,也不用改网页文件。
      

  3.   

    保存为1.txt
    txt = new Array(14); 
    txt[0] ='asdgagadg'       
    txt[1] ='sdagggggggggggggggggggggggggggggggggggggggggggggggg!' 
    txt[2] ='gggggggggggggggggggggggggggggggggggggggggggggg,'
    txt[3] ='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa。'      
    txt[4] ='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'     
    txt[5] ='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy' 
    txt[6] ='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj。' 
    txt[7] ='rtrrrrrrrrrrrrrrrrrrrrrrr' 
    txt[8] ='“ttttttttttttttttttttttttttttt。”' 
    txt[9] ='eeeeeeeeeeeeeeeeeeeeee,'
    txt[10]='tttttttttttttttttttttttttt。 '
    txt[11]='为ttttttttttttttttttttttttttttttttttttttt '
    txt[12]='mmmmmmmmmmmmmmmmmmmmmmm '
    txt[13]='rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr '
    txt[14]='ttttttttttttttttttttttttttttttttt '调用方法:
    <script language="javascript" src="1.txt"></script>
    <script language="javascript">
    document.write ("<marquee scrollamount='1' scrolldelay='100' direction= 'up' width='170' id=xiaoqing height='265' onmouseover=xiaoqing.stop() onmouseout=xiaoqing.start()>");     
    for (i=0;i<index;i++){     
        
    document.write ("<FONT COLOR='#ffffff' font size='2'>"+txt[i] + "</font></A><br><br>");     
    }     
    document.write ("</marquee>")     
    </script>
      

  4.   

    先谢谢了,但是我还想把你哪个和下面的程序结合起来,你看看如何
    <script language="JavaScript1">
    <!--
    <!--
    function MM_reloadPage(init) {  //reloads the window if Nav4 resized
      if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
        document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
      else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    // -->
    //-->
    </script>
    <script>
    <!--
    function movstar(a,time){
    movx=setInterval("mov("+a+")",time)
    }
    function movover(){
    clearInterval(movx)
    }
    function mov(a){
    scrollx=new_date.document.body.scrollLeft
    scrolly=new_date.document.body.scrollTop
    scrolly=scrolly+a
    new_date.window.scroll(scrollx,scrolly)
    }
    /*function o_down(theobject){
    object=theobject
    while(object.filters.alpha.opacity>60){
    object.filters.alpha.opacity+=-10}
    }
    function o_up(theobject){
    object=theobject
    while(object.filters.alpha.opacity<100){
    object.filters.alpha.opacity+=10}
    }*/
    function wback(){
    if(new_date.history.length==0){window.history.back()}
    else{new_date.history.back()}
    }function MM_findObj(n, d) { //v4.0
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && document.getElementById) x=document.getElementById(n); return x;
    }//-->
    </script><script language="javaScript">
    <!--function openIT(theURL,W,H,X,Y, wname) {
    CLOSEdwn  = "img/close_dwn.gif"
    CLOSEup  = "img/close_up.gif"
    CLOSEovr  = "img/close_ovr.gif"
    MINIdwn  = "img/mini_dwn.gif"
    MINIup  = "img/mini_up.gif"
    MINIovr  = "img/mini_ovr.gif"
    NONEgrf  = "img/none.gif"
    CLOCKgrf = "img/clock.gif"
    titHTML       = "<font face=verdana size=1>&nbsp;||- </font>"
    titWIN = "&nbsp;window title"
    winBORDERCOLOR    = "#000000"
    winBORDERCOLORsel = "#FFFFFF"
    winBGCOLOR     = "#33cc33"
    winBGCOLORsel  = "#00FF00"
    return openchromeless(theURL, wname, W, H, X, Y, NONEgrf, CLOSEdwn, CLOSEup, CLOSEovr, MINIdwn, MINIup, MINIovr, CLOCKgrf, titHTML, titWIN, winBORDERCOLOR, winBORDERCOLORsel, winBGCOLOR, winBGCOLORsel)
    }
    //-->
    </SCRIPT><body bgcolor="#003366" text="#000000" onLoad="MM_dragLayer('dd','',0,0,60,8,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('dd1','',0,0,60,8,true,false,-1,-1,-1,-1,false,false,0,'',false,'');MM_dragLayer('Layer1','',0,0,80,10,true,false,-1,-1,-1,-1,false,false,0,'',false,'')">
    ---------------------------------
    <a href="javascript:;"><<img src="file:///F|/wkr/PPDOGS/image/jt1.gif" width="10" height="15" onMouseDown=movover();movstar(-3,2) onMouseOut=movover();/*o_up(this)*/ 
          onMouseOver=movstar(-1,20);/*o_down(this)*/ onMouseUp=movover();movstar(-1,20) alt="按住不放快速滚动" border="0">
    <a href="javascript:;"><img src="file:///F|/wkr/PPDOGS/image/jt2.gif" width="10" height="15" onMouseDown=movover();movstar(3,2) onMouseOut=movover();/*o_up(this)*/ 
          onMouseOver=movstar(1,20);/*o_down(this)*/ onMouseUp=movover();movstar(1,20) alt="按住不放快速滚动" border="0">
    -----------------------
    这时是按住钮的时候快速动,移上的时候动,但我想让它一开始就动,移上的时候就快速滚动,而且中间的文字也是调的txt文件,可以实现吗?谢谢
      

  5.   

    用windows自带的fso(file system object)