TShopping

 找回密碼
 註冊
搜索
查看: 1363|回復: 0

[分享] 各種各樣的廣告代碼大全

[複製鏈接]
發表於 2008-5-29 18:18:55 | 顯示全部樓層 |閱讀模式
 
Push to Facebook Push to Plurk Push to Twitter 
左欄浮動廣告
  1. <script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: <script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 180px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='border-left:1px solid #2E6287;border-top:1px solid #2E6287;border-right:1px solid #2E6287;font-size:12px;color:#ffffff; border-bottom-color:#2E6287; border-bottom-width:1px'><TR bgcolor=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE><table border='1' width='150' height='500' bordercolor='#2E6287'><tr><td>廣告內容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>
複製代碼

右欄浮動廣告
  1. <script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE><table border='1' width='150' id='table1' bordercolor='#2E6287' height='500'><tr><td>廣告內容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>
複製代碼

左欄固定廣告
  1. <DIV id=searchspe style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>
複製代碼

右欄固定廣告
  1. <DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=360 style='border-left:1px solid #333333;border-top:1px solid #333333;border-right:1px solid #333333;font-size:12px;color:#ffffff'><TR bgcolor=#2E6287><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>
複製代碼

漂浮廣告代碼
  1. <div id="img" style="position:absolute;; width: 200; height: 151">廣告內容</div>
  2. <script LANGUAGE="JavaScript">
  3. var xPos = 20;
  4. var yPos = 10;
  5. img.style.left= xPos;
  6. img.style.top = yPos;
  7. var step = 1;
  8. var delay = 30;
  9. var width,height,Hoffset,Woffset;
  10. var y = 1;
  11. var x = 1;
  12. var interval;
  13. img.visibility = "visible";

  14. function changePos()
  15. {
  16. width = document.body.clientWidth;
  17. height = document.body.clientHeight;
  18. Hoffset = img.offsetHeight;
  19. Woffset = img.offsetWidth;
  20. if (y)
  21. {
  22. yPos = yPos + step;
  23. }
  24. else
  25. {
  26. yPos = yPos - step;
  27. }
  28. if (yPos < 0)
  29. {
  30. y = 1;
  31. yPos = 0;
  32. }
  33. if (yPos >= (height - Hoffset))
  34. {
  35. y = 0;
  36. yPos = (height - Hoffset);
  37. }
  38. if (x)
  39. {
  40. xPos = xPos + step;
  41. }
  42. else
  43. {
  44. xPos = xPos - step;
  45. }
  46. if (xPos < 0)
  47. {
  48. x = 1;
  49. xPos = 0;
  50. }
  51. if (xPos >= (width - Woffset))
  52. {
  53. x = 0;
  54. xPos = (width - Woffset);
  55. }
  56. img.style.left = xPos + document.body.scrollLeft;
  57. img.style.top = yPos + document.body.scrollTop;
  58. }

  59. function start()
  60. {
  61. interval = setInterval('changePos()', delay);
  62. }

  63. function pause_resume()
  64. {
  65. clearInterval(interval);
  66. }
  67. start();
  68. </script>
複製代碼

固定對聯
  1. <DIV id=searchspe style='Z-INDEX: 100; right: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>
  2. 廣告內容</DIV><DIV id=searchspe2 style='Z-INDEX: 100; left: 5px; POSITION: absolute; TOP: 50px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick=searchspe2.style.visibility='hidden' width=30>關 閉</TD></TR></TABLE>
  3. 廣告內容</DIV>
複製代碼

隨動對聯
  1. <script language=javascript>function close163news(){searchspe.style.visibility='hidden';searchspe2.style.visibility='hidden';} var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#C54A00><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>";document.write(specialcode);lastScrollX=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollX);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollX=lastScrollX+percent;}window.setInterval("heartBeat0()",1);var specialcode2="<DIV id=searchspe2 style='Z-INDEX: 100; left: 1px; POSITION: absolute; TOP: 30px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='font-size:12px;color:#ffffff'><TR bgcolor=#12BDFF><TD height=20> 推薦↓</TD><TD style='CURSOR: hand' onclick='close163news()' width=30>關 閉</TD></TR></TABLE>廣告內容</DIV>";document.write(specialcode2);lastScrollY=0;function heartBeat1(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe2.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat1()",1);</script>
複製代碼

 

臉書網友討論
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2016-12-6 21:57 , Processed in 0.050270 second(s), 18 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表