How to handle long data when displaying it in html

How to handle long data when displaying it in html
When displaying long data in HTML, you can cut off the data and display the complete data when the mouse moves over it.
For example, consider the following situation.

accomplish:

Copy code
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>

<<:  How to implement digital paging effect code and steps in CSS

>>:  Summary of the dockerfile-maven-plugin usage guide

Recommend

Record the whole process of MySQL master-slave configuration based on Linux

mysql master-slave configuration 1. Preparation H...

How to obtain and use time in Linux system

There are two types of Linux system time. (1) Cal...

Linux system to view CPU, machine model, memory and other information

During system maintenance, you may need to check ...

avue-crud implementation example of multi-level complex dynamic header

Table of contents Preface Background data splicin...

js to realize the mouse following game

This article shares the specific code of js to im...

A detailed guide to custom directives in Vue

Table of contents 1. What is a custom instruction...

Dynamically edit data in Layui table row

Table of contents Preface Style Function Descript...

How to automatically delete records before a specified time in Mysql

About Event: MySQL 5.1 began to introduce the con...

HTML pop-up div is very useful to realize mobile centering

Copy code The code is as follows: <!DOCTYPE ht...

The url value of the src or css background image is the base64 encoded code

You may have noticed that the src or CSS backgroun...

21 MySQL standardization and optimization best practices!

Preface Every good habit is a treasure. This arti...

Linux uses shell scripts to regularly delete historical log files

1. Tools directory file structure [root@www tools...