Home > Article > Web Front-end > Processing when html displays data with a large length
When displaying long data in html, the data can be intercepted and displayed, and then the complete data will be displayed when the mouse rolls over. There is a good example below, you can refer to it.
When displaying long data in HTML, the data can be intercepted and displayed, and the complete data can be displayed when the mouse rolls over.
For example, the following situation.
Implementation:
The code is as follows:
<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>
When more html displays data with a larger length Please pay attention to the PHP Chinese website for processing related articles!