介绍如何让TAGS在帝国cms6.6中随机颜色大小展示的方法,请看以下调用教程
<div class="hotlist" id="ctag">
[showtags]'',60,0,'num desc',0,'s,r','',1,''[/showtags]
</div>
<script>
var bcolor = document.getElementById("ctag").getElementsByTagName("a");
for(i=0;k=bcolor.length,i<k;i++)
{
var str = "0123456789ABCDEF";
var t = "#";
for(j=0;j<6;j++)
{t = t+ str.charAt(Math.random()*str.length);}
var fsize;
fsize=parseInt(Math.random()*(20)+6);
bcolor[i].style.color=t;
bcolor[i].style.fontSize=fsize + "px";
}
</script>
更多信息请查看IT技术专栏