with(marquees){ 那个marquees在哪里?!

解决方案 »

  1.   

    <script type="text/javascript" language="javascript">
        var time = 500;
        var h = 0;
        function addCount()
        {
            if(time>0)
            {
                time--;
                h = h+5;
            }
            else
            {
                return;
            }
            if(h>340)  //高度
            {
                return;
            }
            document.getElementById("ads").style.display = "";
            document.getElementById("ads").style.height = h+"px";
            setTimeout("addCount()",30); 
        }
        
        window.onload = function showAds()
        {
            addCount();
            setTimeout("noneAds()",18000); //停留时间自己适当调整
        }
        </script>
        
        <script type="text/javascript" language="javascript">
        var T = 500;
        var N = 340; //高度
        function noneAds()
        {
            if(T>0)
            {
                T--;
                N = N-5;
            }
            else
            {
                return;
            }
            if(N<0)
            {
                document.getElementById("ads").style.display = "none";
                return;
            }
            
            document.getElementById("ads").style.height = N+"px";
            setTimeout("noneAds()",30); 
        }
        </script>
    </head><body>
    <div id="ads" style="margin:auto; display:none; width:730px; top:0px; height:0px; border:solid 1px #000; background-color:#fafafa; overflow:hidden; text-align:center;">
            <script>writeStr('<embed src=http://www.zysteel.com/tg/tgflash/3.swf type=application/x-shockwave-flash wmode=transparent width=750 height=340 quality=High></embed>')</script>
        </div>
     
     
     <table width="310" height="20" border="0" cellpadding="0" cellspacing="0">
     <tr>
        <td width="26%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">报价单位</span></td>
        <td width="16%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">品名</span></td>
        <td width="17%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">规格</span></td>
        <td width="16%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">材质</span></td>
        <td width="12%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">单价</span></td>
        <td width="13%" align="left" bgcolor="#F2F7FB"><span class="STYLE12">产地</span></td>
      </tr>
    </table>
    <div id="marquees">
      <table width="310" border="0" cellpadding="0" cellspacing="0">                  
       <tr>
       <td align=left>aaaaaaaaaaaaaaaaaaaaaaaaaaaaa
       </td>
      </tr>
      </table> <script language="JavaScript">marqueesHeight=222;
    stopscroll=false;with(marquees){
      style.width=0;
      style.height=marqueesHeight;
      style.overflowX="visible";
      style.overflowY="hidden";
      noWrap=true;
      onmouseover=new Function("stopscroll=true");
      onmouseout=new Function("stopscroll=false");
    }
    document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');preTop=0; currentTop=0; function init(){
      templayer.innerHTML="";
      while(templayer.offsetHeight<marqueesHeight){
        templayer.innerHTML+=marquees.innerHTML;
      }
      marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
      setInterval("scrollUp()",100);
    }
    document.body.onload=init;function scrollUp(){
      if(stopscroll==true) return;
      preTop=marquees.scrollTop;
      marquees.scrollTop+=1;
      if(preTop==marquees.scrollTop){
        marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
        marquees.scrollTop+=1;
      }
    }
    </script></div>
        
    </body>
    </html>
      

  2.   

    init中把innerHTML加来加去,完全不明白要做什么?!
    function init(){
      templayer.innerHTML="";
      while(templayer.offsetHeight<marqueesHeight){
        templayer.innerHTML+=marquees.innerHTML;
      }
      marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
      setInterval("scrollUp()",100);
    }
      

  3.   

    "init中把innerHTML加来加去,完全不明白要做什么?! "
    这个是原来网站上的,我也不懂是什么意思,我现在就想在这个网站上加一个收缩广告,可是一直实现不了,急!!