帝国CMS TAGS标签随机颜色/大小/变化的调用方法!使用[showtags]标签随机调用!
帝国CMS的TAG标签、随机颜色、随机大小调用的方法,在要显示TAGS的地方粘贴下列代码: 1、TAG标签带数量显示的调用方法<divid="tags">[showtags]&#39;&#39;,10,10,&#39;numdesc&#39;,0,&#39;s,r&#39;,&#39;&#39;,1,&#……
在要显示TAGS的地方粘贴下列代码:
1、TAG标签带数量显示的调用方法
<divid="tags">[showtags]'',10,10,'numdesc',0,'s,r','',1,''[/showtags]</div><script>varbcolor=document.getElementById("tags").getElementsByTagName("a");for(i=0;k=bcolor.length,i<k;i++){varstr="0123456789ABCDEF";vart="#";for(j=0;j<6;j++){t=t+str.charAt(Math.random()*str.length);}varfsize;fsize=parseInt(Math.random()*(20)+6);if(fsize<12){fsize=12}bcolor[i].style.color=t;bcolor[i].style.fontSize=fsize+"px";}</script>
2、TAG标签不带数量的地域方法
<divid="ctag">[showtags]'',40,0,'rand()',0,'s,r','',0,''[/showtags]</div><scriptlanguage="javascript">varbcolor=document.getElementById("ctag").getElementsByTagName("a");for(i=0;k=bcolor.length,i<k;i++){varstr="0123456789ABCDEF";vart="#";for(j=0;j<6;j++){t=t+str.charAt(Math.random()*str.length);}varfsize;fsize=parseInt(Math.random()*(20)+6);bcolor[i].style.color=t;bcolor[i].style.fontSize=fsize+"px";}</script>
【代码详细注释】:
[showtags]'',10,10,'num desc',0,'s,r','',1,''[/showtags]
''=指定ID,
10=调用总数量,
10=每行显示数量,
num desc=显示排序,
0=只显示推荐的(0为不显示,1为显示),
s,r=推荐TAGS属性(s为加粗,r为加红),
''=显示间隔符(一般为空格符:),
1=显示信息数量(0为不显示,1为显示),
''=链接使用变量(一般为tagname和tagid)
- 上一篇
帝国CMS灵动标签e:loop的使用
灵动标签 (e:loop)格式:[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]模板代码内容[/e:loop]例子:<table width="100%" border="0" cellspacing="1" cellpadding="3">[e:loop={栏
- 下一篇
帝国CMS模板判断输出是副标题还是原标题的2种方法
帝国cms模板判断输出是副标题还是原标题的2种方法1.复制代码代码如下:<?=$bqr[ftitle]?$bqr[ftitle]:$bqr[title]?>要注意的是,这段代码需要在灵动标签中使用,所以基本也只能在中文中出现,如果想要在title标签中显示标题