主頁 > 知識(shí)庫 > html顯示長度較大的數(shù)據(jù)時(shí)的處理方法

html顯示長度較大的數(shù)據(jù)時(shí)的處理方法

熱門標(biāo)簽:使用U盤裝系統(tǒng) 阿里云 美圖手機(jī) 百度競(jìng)價(jià)點(diǎn)擊價(jià)格的計(jì)算公式 智能手機(jī) 網(wǎng)站建設(shè) 檢查注冊(cè)表項(xiàng) 硅谷的囚徒呼叫中心
在html中顯示長度較大的數(shù)據(jù)時(shí),可以將數(shù)據(jù)截取顯示,當(dāng)鼠標(biāo)滑過時(shí)再顯示完整數(shù)據(jù)。
例如,下面這種情況。
 
實(shí)現(xiàn):

復(fù)制代碼
代碼如下:

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

標(biāo)簽:湘潭 黃山 湖北 山南 賀州 懷化 通遼 煙臺(tái)

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《html顯示長度較大的數(shù)據(jù)時(shí)的處理方法》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266