在html中显示长度较大的数据时,可以将数据截取显示,当鼠标滑过时再显示完整数据。
例如,下面这种情况。
实现:
复制代码
代码如下:<a title="${siteBoardInfoList.boardUrl}">
<c:if test="${fn:length(siteBoardInfoList.boardUrl) >= 40}">
${fn:substring(siteBoardInfoList.boardUrl,0,20)}......${fn:substring(siteBoardInfoList.boardUrl,fn:length(siteBoardInfoList.boardUrl)-21,fn:length(siteBoardInfoList.boardUrl))}
</c:if>
<c:if test="${fn:length(siteBoardInfoList.boardUrl) < 40}">
${siteBoardInfoList.boardUrl}
</c:if>
</a>
最后
以上就是俊秀小兔子最近收集整理的关于html显示长度较大的数据时的处理方法的全部内容,更多相关html显示长度较大内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复