互联网观察 网站建设 网站运营 网上创业 电子商务 建站软件 建站软件教程 网站开发 网页制作 收藏本站
建站常识 | 域名 | 主机 | 网上开店 | 搜索引擎优化 | 网站推广 | 网络赚钱 | 站长经验 | 个人建站 | 网站设计 | 网页特效 | wap网站

层(div或table)的左右滚动

<script language="javascript">
function MM_setIMG(w,h,d) {
  if (w==null) {w=0}
  if (h==null) {h=0}
  if (w<=h){ if (h>=114 || h==0) {d.height=114}}else{ if (w>=114 || w==0) {d.width=114}}
}
   </script>
   <table width="558" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
     <td bgcolor="#FFFFFF" style="padding-left:2px">
      <div id="demoz" style="overflow:hidden;width:550;">
       <table border="0" align="left" cellpadding="0" cellspacing="0" cellspace="0">
        <tr>
         <td id="demo1z" valign="top">
          <table border="0" align="left" cellpadding="0" cellspacing="0" cellspace="0">
           <tr>
            <td valign="top"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
               <td width="150" align="center"><A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7201"><img src="http://cs.yide.com:9000/commerce/ProductPic/N2006317121650s.jpg" border="0"
                  onLoad="javascript:MM_setIMG(this.width,this.height,this)"></A></td>
              </tr>
              <tr>
               <td><TABLE width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2"
                 style="BORDER-COLLAPSE: collapse">
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">
                   <A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7201">Gucci High Heel ....</A></TD>
                 </TR>
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">Gucci高跟系带凉鞋</FONT></TD>
                 </TR>
                 <TR>
                  <TD align="middle" colSpan="2" height="12">
                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                     <TD width="44%" bgColor="#ffffff">
                      <IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"> 美元价
                     </TD>
                     <TD bgColor="#ffffff"><font color="red"><B> 525.00 </B></font>
                     </TD>
                    </tr>
                   </table>
                  </TD>
                 </TR>
                </TABLE>
               </td>
              </tr>
             </table>
            </td>
            <td valign="top"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
               <td width="150" align="center"><A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7200"><img src="http://cs.yide.com:9000/commerce/ProductPic/N20063171299s.jpg" border="0" onLoad="javascript:MM_setIMG(this.width,this.height,this)"></A></td>
              </tr>
              <tr>
               <td><TABLE width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2"
                 style="BORDER-COLLAPSE: collapse">
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">
                   <A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7200">Giuseppe Zanott ....</A></TD>
                 </TR>
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">小山羊皮高跟女鞋</FONT></TD>
                 </TR>
                 <TR>
                  <TD align="middle" colSpan="2" height="12">
                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                     <TD width="44%" bgColor="#ffffff">
                      <IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"> 美元价
                     </TD>
                     <TD bgColor="#ffffff"><font color="red"><B> 475.00 </B></font>
                     </TD>
                    </tr>
                   </table>
                  </TD>
                 </TR>
                </TABLE>
               </td>
              </tr>
             </table>
            </td>
          
            <td valign="top"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
               <td width="150" align="center"><A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7170"><img src="http://cs.yide.com:9000/commerce/ProductPic/N2006315153814s.jpg" border="0"
                  onLoad="javascript:MM_setIMG(this.width,this.height,this)"></A></td>
              </tr>
              <tr>
               <td><TABLE width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2"
                 style="BORDER-COLLAPSE: collapse">
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">
                   <A href=http://www.webjx.com/htmldata/2006-03-25/"../featuredproducts/product_jump.asp?product_id=7170">Prada Python/Cr ....</A></TD>
                 </TR>
                 <TR>
                  <TD width="8%" bgColor="#ffffff" height="25"><IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"></TD>
                  <TD bgColor="#ffffff" height="25">Prada蟒纹/鳄鱼纹高跟鞋</FONT></TD>
                 </TR>
                 <TR>
                  <TD align="middle" colSpan="2" height="12">
                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                     <TD width="44%" bgColor="#ffffff">
                      <IMG height="11" src="http://www.webjx.com/htmldata/publicimg/arrow04.gif" width="13"> 美元价
                     </TD>
                     <TD bgColor="#ffffff"><font color="red"><B> 850.00 </B></font>
                     </TD>
                    </tr>
                   </table>
                  </TD>
                 </TR>
                </TABLE>
               </td>
              </tr>
             </table>
            </td>
           </tr>
          </table>
         </td>
         <td id="demo2z" valign="top"></td>
        </tr>
       </table>
      </div>
     </td>
    </tr>
   </table>
   <script>
var speedz=30
demo2z.innerHTML=demo1z.innerHTML
function Marqueez(){
if(demo2z.offsetWidth-demoz.scrollLeft<=0)
demoz.scrollLeft-=demo1z.offsetWidth
else{
demoz.scrollLeft++
}
}
var MyMarz=setInterval(Marqueez,speedz)
demoz.onmouseover=function() {clearInterval(MyMarz)}
demoz.onmouseout=function() {MyMarz=setInterval(Marqueez,speedz)}
   </script>




上一篇:分享HTML中少为人知的个性化标记
下一篇:层(div)的上下滚动
相关分类
网页制作 (4121)
  html教程 (591)
  css教程 (546)
  Dreamweaver教程 (1006)
  JavaScript教程 (834)
  网页制作技巧 (378)
  网页特效 (766)
 



版权所有 Copyright© 2006 黑马建站宝典 联系方式:heima123#gmail.com