Home  >  Article  >  Web Front-end  >  Processing when html displays data with a large length

Processing when html displays data with a large length

高洛峰
高洛峰Original
2017-03-02 14:52:161712browse

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.
Processing when html displays data with a large length
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!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn