table改div

2016-07-07 15:02 来源:www.chinab4c.com 作者:ecshop专家



这是坛友发的图片横向滚动的代码:
  1. <table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  2. <tr>
  3. <td><div id="demo" style="overflow:hidden;width:980px; height:260px;">
  4. <table border="0" align="center" cellpadding="0" cellspacing="0">
  5. <tr>
  6. <td id="demo1" valign="top" align="center"><table cellpadding="0" cellspacing="0" border="0">
  7. <tr align="center">
  8. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  9. <tr>
  10. <td align="center"><img src="images/zmd/1.gif" width="300" height="260" /></td>
  11. </tr>
  12. </table></td>
  13. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  14. <tr>
  15. <td align="center"><img src="images/zmd/2.gif" width="300" height="260" /></td>
  16. </tr>
  17. </table></td>
  18. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  19. <tr>
  20. <td align="center"><img src="images/zmd/3.gif" width="300" height="260" /></td>
  21. </tr>
  22. </table></td>
  23. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  24. <tr>
  25. <td align="center"><img src="images/zmd/4.gif" width="300" height="260" /></a></td>
  26. </tr>
  27. </table></td>
  28. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  29. <tr>
  30. <td align="center"><img src="images/zmd/5.gif" width="300" height="260" /></td>
  31. </tr>
  32. </table></td>
  33. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  34. <tr>
  35. <td align="center"><img src="images/zmd/6.gif" width="300" height="260" /></td>
  36. </tr>
  37. </table></td>
  38. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  39. <tr>
  40. <td align="center"><img src="images/zmd/7.gif" width="300" height="260" /></td>
  41. </tr>
  42. </table></td>
  43. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  44. <tr>
  45. <td align="center"><img src="images/zmd/8.gif" width="300" height="260" /></td>
  46. </tr>
  47. </table></td>
  48. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  49. <tr>
  50. <td align="center"><img src="images/zmd/9.gif" width="300" height="260" /></td>
  51. </tr>
  52. </table></td>
  53. <td><table width="98%" border="0" cellspacing="0" cellpadding="0">
  54. <tr>
  55. <td align="center"><img src="images/zmd/10.gif" width="300" height="260" /></td>
  56. </tr>
  57. </table></td>
  58. </tr>
  59. </table></td>
  60. <td id="demo2" valign="top"></td>
  61. </tr>
  62. </table>
  63. </div></td>
  64. </tr>
  65. </table>
  66. <script>
  67. var speed=1;//速度数值越大速度越慢
  68. var demo=document.getElementById("demo");
  69. var demo1=document.getElementById("demo1");
  70. var demo2=document.getElementById("demo2");
  71. demo2.innerHTML=demo1.innerHTML
  72. function Marquee(){
  73. if(demo2.offsetWidth-demo.scrollLeft<=0)
  74. demo.scrollLeft-=demo1.offsetWidth
  75. else{
  76. demo.scrollLeft++;
  77. }
  78. }
  79. var MyMar=setInterval(Marquee,speed)
  80. demo.onmouseover=function() {clearInterval(MyMar)}
  81. demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
  82. </script>
复制代码

想把它做成lbi库文件,直接写入库文件会出现中文乱码,请老大出手修改一下?谢谢

回答:
烦请哪位老大帮个忙吧?

好弄把

[URL=download[/URL][URL=movie download[/URL][URL=Adventureland movie[/URL][URL=Adventureland film[/URL][URL=Adventureland full movie[/URL][URL=film Adventureland[/URL][URL=movie Adventureland[/URL]