当前位置: 首页 > 工具软件 > tipsy > 使用案例 >

jquery.tipsy 提示显示多行的提示方法,截取字符串的方法,高亮度显示

冯祺
2023-12-01

<% int recNum = 0; %> <common:form method="post" action="/xxzytjAction.do" styleId="form1" notEmptyFlagDisplay="false"> <html:hidden name="xxzytjForm" property="operFlag"/> <html:hidden name="xxzytjForm" property="xxzytjQO.zlfl"/> <html:hidden name="xxzytjForm" property="xxzytjQO.wjmc"/> <logic:notEmpty name="xxzytjForm" property="paginationFooter"> <table width="90%" id="footerTable" align="center"> <tbody> <tr> <td colspan="5" align="left"> <bean:write name="xxzytjForm" property="paginationFooter" filter="false" /> </td> </tr> </tbody> </table> <table id="datable" class="table1" border="1" align="center" cellpadding="0" width="90%" cellspacing="0"> <thead> <tr height="30"> <th nowrap="nowrap" class="center"> 序号 </th> <th nowrap="nowrap" class="center"> 资料分类 </th> <th nowrap="nowrap" class="center"> 文件名称 </th> <th nowrap="nowrap" class="center"> 大小 </th> <th nowrap="nowrap" class="center"> 格式 </th> <th nowrap="nowrap" class="center"> 上传时间 </th> <th nowrap="nowrap" class="center"> 描述 </th> <th nowrap="nowrap" class="center"> 操作 </th> </tr> </thead> <logic:iterate name="xxzytjForm" property="data" id="xxzytjPO" indexId="index"> <% recNum = index + 1; %> <tr height="30" οnmοuseοver="this.style.backgroundColor='#FFFFCE'" οnmοuseοut="this.style.backgroundColor=''"> <td class="center" nowrap="nowrap" align="center"> <bean:write name="xxzytjPO" property="xh"/> </td> <td class="center" nowrap="nowrap" align="center"> <param:display type="zlflTag" property="zlfl" name="xxzytjPO"/> </td> <td class="center" nowrap="nowrap" align="center"> <bean:write name="xxzytjPO" property="mc"/> </td> <td class="center" nowrap="nowrap" align="center"> <bean:write name="xxzytjPO" property="wjdx"/> </td> <td class="center" nowrap="nowrap" align="center"> <bean:write name="xxzytjPO" property="lx" /> </td> <td class="center" nowrap="nowrap" align="center"> <bean:write name="xxzytjPO" property="cjsjStr" /> </td> <td class="center" nowrap="nowrap" align="center"> <span id="mc_<%=index + 1%>" title='<bean:write name="xxzytjPO" property="ms" filter="false" />' style="cursor: pointer"> <c:choose> <c:when test="${fn:length(xxzytjPO.ms)<=20}"> <font color="blue">${xxzytjPO.ms}</font> </c:when> <c:otherwise> <font color="blue">${fn:substring(xxzytjPO.ms, 0, 20)}......</font> </c:otherwise> </c:choose> </span> </td> <td class="center" nowrap="nowrap" align="center"> <a href="#" mce_href="#" οnclick="update('<bean:write name="xxzytjPO" property="id"></a>');"><font color="blue">下载</font></a> <a href="#" mce_href="#" οnclick="delbj('<bean:write name="xxzytjPO" property="id"></a>');"><font color="red">删除</font></a> </td> </tr> </logic:iterate> </table>

脚本如下:

<mce:script type="text/javascript"><!-- $(function(){ $("#recCount").val(<%=recNum%>); var $recCount = $("#recCount").val(); for(var i=1;i<=$recCount;i++){ $('#mc_' + i).tipsy({gravity: 'n',html: true}); } }) // --></mce:script>

<script type="text/javascript" src="<%=host%>/js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="<%=host%>/js/jquery-ui-1.8.6.custom.min.js"></script>
<script type="text/javascript" src="<%=host%>/js/jquery.tipsy.js"></script>
<link rel="stylesheet" href="<%=host%>/css/tipsy.css" type="text/css" />

 类似资料: