幻灯淘宝联盟的通栏主题橱窗(美容,女装,食品,运动,数码)推广代码

     淘宝联盟的通栏主题橱窗(美容,女装,食品,运动,数码)共有5个,宽度为950,非常的适合每一个页面插入一个,但由于每一个推广都是由js代码写成,故传统的幻灯代码就不能用了,现子啊可以使用以下代码来实现。

演示地址 :https://www.music4x.com/?post=138

  首先给一段带幻灯的代码,就是每一次仅仅显示一个主题橱窗,时间间隔可以自己设置:,5个橱窗轮流显示


<!–请把以下代码放到<body></body>之间–>

<script>
var i=1;
var tmpobj = setInterval("addtime()",15000); //请调整时间,根据你的需要
function addtime()
{
if (i==1)
{
document.getElementById("indexsrh1").style.display='none';
document.getElementById("indexsrh2").style.display='block';
i=2;
}
else if (i==2)
{
document.getElementById("indexsrh2").style.display='none';
document.getElementById("indexsrh3").style.display='block';
i=3;
}
else if (i==3)
{
document.getElementById("indexsrh3").style.display='none';
document.getElementById("indexsrh4").style.display='block';
i=4;
}
else if (i==4)
{
document.getElementById("indexsrh4").style.display='none';
document.getElementById("indexsrh5").style.display='block';
i=5;
}
else if (i==5)
{
document.getElementById("indexsrh5").style.display='none';
document.getElementById("indexsrh1").style.display='block';
i=1;
}
}
</script>
<!–以下的每个div之间放置一段淘宝的橱窗推广代码,默认的是可视第一个层的内容,可以根据你的需要进行更改–>
<div id="indexsrh1" style="display:block"><script type="text/javascript">alimama_bm_revision = "83358f93ab6ef4ffca3305cb8090b5a37288ce52";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "816369";alimama_bm_width = 950;alimama_bm_height = 388;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_71ffb893c49dbb954a73df4a5ca49bf7_62.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-19/194.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh2" style="display:none "><script type="text/javascript">alimama_bm_revision = "a690f78525aa9d6a8305cc4a49c480a9087e1e20";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "817573";alimama_bm_width = 950;alimama_bm_height = 438;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_6a449851cf1454703a137c9b09b4d08b_23.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-21/201.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh3" style="display:none "><script type="text/javascript">alimama_bm_revision = "83358f93ab6ef4ffca3305cb8090b5a37288ce52";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "816184";alimama_bm_width = 950;alimama_bm_height = 436;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_ebcb54f62ed235ab74d591f6e3805b9d_36.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-19/189.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh4" style="display:none "><script type="text/javascript">alimama_bm_revision = "a690f78525aa9d6a8305cc4a49c480a9087e1e20";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "723746";alimama_bm_width = 950;alimama_bm_height = 437;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-08-24/2009-08-24_a65cae1411e4419bd9586b92f7b6b755_37.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-21/209.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh5" style="display:none "><script type="text/javascript">alimama_bm_revision = "e1ec947cb481e77529b64584b4e5a64804bb1d18";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "874994";alimama_bm_width = 950;alimama_bm_height = 445;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-07/2009-09-07_87b3ea1c9226d1f91b7a8b02891d48cc_46.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-09-02/233.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>

 

要显示两个橱窗的代码见下面


<!–请把以下代码放到<body></body>之间–>
<script>
var i=1;
var tmpobj = setInterval("addtime()",30000); //这里调整你的轮换时间
function addtime()
{
if (i==1)
{
document.getElementById("indexsrh1").style.display='none';
document.getElementById("indexsrh2").style.display='none';
document.getElementById("indexsrh3").style.display='block';
document.getElementById("indexsrh4").style.display='block';
i=2;
}
else if (i==2)
{
document.getElementById("indexsrh3").style.display='none';
document.getElementById("indexsrh4").style.display='none';
document.getElementById("indexsrh5").style.display='block';
document.getElementById("indexsrh6").style.display='block';
i=3;
}
else if (i==3)
{
document.getElementById("indexsrh5").style.display='none';
document.getElementById("indexsrh6").style.display='none';
document.getElementById("indexsrh1").style.display='block';
document.getElementById("indexsrh2").style.display='block';
i=1;
}
}
</script>
<!–以下的每个div之间放置一段淘宝的橱窗推广代码–>
<div id="indexsrh1" style="display:block "><script type="text/javascript">alimama_bm_revision = "83358f93ab6ef4ffca3305cb8090b5a37288ce52";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "816369";alimama_bm_width = 950;alimama_bm_height = 388;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_71ffb893c49dbb954a73df4a5ca49bf7_62.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-19/194.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh2" style="display:block "><script type="text/javascript">alimama_bm_revision = "a690f78525aa9d6a8305cc4a49c480a9087e1e20";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "817573";alimama_bm_width = 950;alimama_bm_height = 438;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_6a449851cf1454703a137c9b09b4d08b_23.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-21/201.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh3" style="display:none "><script type="text/javascript">alimama_bm_revision = "83358f93ab6ef4ffca3305cb8090b5a37288ce52";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "816184";alimama_bm_width = 950;alimama_bm_height = 436;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_ebcb54f62ed235ab74d591f6e3805b9d_36.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-19/189.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh4" style="display:none "><script type="text/javascript">alimama_bm_revision = "a690f78525aa9d6a8305cc4a49c480a9087e1e20";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "723746";alimama_bm_width = 950;alimama_bm_height = 437;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-08-24/2009-08-24_a65cae1411e4419bd9586b92f7b6b755_37.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-21/209.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh5" style="display:none "><script type="text/javascript">alimama_bm_revision = "e1ec947cb481e77529b64584b4e5a64804bb1d18";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "874994";alimama_bm_width = 950;alimama_bm_height = 445;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-07/2009-09-07_87b3ea1c9226d1f91b7a8b02891d48cc_46.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-09-02/233.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
<div id="indexsrh6" style="display:none "><script type="text/javascript">alimama_bm_revision = "83358f93ab6ef4ffca3305cb8090b5a37288ce52";alimama_pid = "mm_10480604_0_0";alimama_bm_uid = "";alimama_bm_bid = "816369";alimama_bm_width = 950;alimama_bm_height = 388;alimama_bm_xmlsrc = "http://img.alimama.cn/bm/x/2009-09-02/2009-09-02_71ffb893c49dbb954a73df4a5ca49bf7_62.xml";alimama_bm_ds = "http://img.alimama.cn/ga/t/2009-08-19/194.xml";alimama_bm_as = "taoke";</script><script type="text/javascript" src="http://bm.alimama.cn/bmv1.js?v=a25a29e8bd84be55fbec128d322c23a516544fad"></script></div>
 

相关内容推荐

发表评论

电子邮件地址不会被公开。 必填项已用*标注