AslroNx's World

dede缩略图代码

2017-7-8 aslronx

//随机图片
var m=3;
var n=Math.floor(Math.random()*m+1)
document.write ("<img src='/images/nt"+n+".jpg' border=0 class='news-thumb'/>");

//php代码
[field:array runphp='yes']
@me = (strpos(@me['litpic'],'defaultpic') ? "
<script src='/images/road.js'></script>
                    " : "<a href='{@me['arcurl']}' class='preview'><img src='{@me['litpic']}'class='news-thumb'/></a>
                    ");
[/field:array]

发表评论: