<#if (topic.postedBy.username)??> ${(topic.postedBy.username)[0]}****${(topic.postedBy.username)[topic.postedBy.username?length-1]}</#if>
这个是什么需求 循环出来之后重新赋值是什么场景
直接js遍历已经生产的dom就行更新就行了吧
var arr=['1111','2222','3333']//假设arr为返回的name数组
$('span.name').each(function(i,el){
this.innerHTML=arr[i]||'--'
});
后台对发言人处理一下:
例如:
String produceName = order.getProduceName();
String newName = produceName.charAt(0)+"******"+produceName.charAt(produceName.length()-1);
order.setProduceName(newName);