标签:搜索关键字加粗
后台代码
List<Notice> nlist= query.list(); for(Notice notice:nlist){ notice.setTitle(notice.getTitle().replaceAll(keyword,"<font color=‘red‘><B>" + keyword + "</B></font>")); }
参考文章:
http://bbs.csdn.net/topics/260004056
if (key != null) { name = name.replaceAll(key,"<font color=‘red‘>" + key + "</font>"); content = content.replaceAll(key,"<font color=‘red‘>" + key + "</font>"); }
本文出自 “一无所有-天行者” 博客,请务必保留此出处http://tianxingzhe.blog.51cto.com/3390077/1679733
标签:搜索关键字加粗
原文地址:http://tianxingzhe.blog.51cto.com/3390077/1679733