<div class="wz-list">里边需要有html做好的Html代码样式</div>
<script>
var attrnew = <%=ImgTopList(617,"sort","new",1,1,"js",10,false,false,false)%>;
var htmlnew ="";
for (var i = 0; i < attrnew.length; i++) {
var attrleng= attrnew[i];
var pnew= attrleng[0];
var herfnew= attrleng[1];
var imgnew = attrleng[2];
var titedata = attrleng[2].toString().split('/');
var newnian= titedata[2].substring(0,6).substring(0,2)
var newyue= titedata[2].substring(0,6).substring(2,4);
var newr= titedata[2].substring(0,6).substring(4,6);
var xdata="20"+newnian+'-'+newyue+'-'+newr; htmlnew += '<div><img src="../'+imgnew+'" alt=""></div><li> <p>'+pnew+'</p><p>开课时间:'+xdata+' </p><> <dl class="dl-dl"><dt><a href="/zhiboketanglixuekaoyanzhiboke/201702/5420.htm"><img src=".././images/sound_btn.png" alt=""></a></dt><>'; }
$(".wz-list").html(htmlnew)
</script>
如果 需要在同一个页面,用到不同的ID和显示数目,可以修改JS代码:如下图所示