<table class="am-table am-table-striped am-table-hover table-main am-table-compact " style="table-layout: fixed;">

<thead>

<tr>

<th class="table-check"><input type="checkbox" id="checkall"/></th>

<th class="table-author am-show-sm-only">节目名称</th>

<th class="table-author am-show-sm-only"style="width:120px;">所属电视台</th>

<th class="table-author am-hide-sm-only" style="width:50px;">版本</th>

<th class="table-author am-hide-sm-only">开始时间</th>

<th class="table-author am-hide-sm-only">结束时间</th>

<th class="table-date am-hide-sm-only">获取时间</th>

<th class="table-set" style="width:140px;">操作</th>

</tr>

</thead>

<tbody>

[#if list][#list list.items as t]

<tr>

<td><input type="checkbox" class="checkone"/><input type="hidden" value="${t._id}"></td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent" >${t.program}</td>

<td >${t.channelName}</td>

<td >${t.__v}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.beginTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.endTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" class="logcontent">${t.addTime?string("yyyy年MM月dd日HH时mm分ss秒")}</td>

<td>

<div class="am-btn-toolbar">

<div class="am-btn-group am-btn-group-xs">

<button class="am-btn am-btn-default am-btn-xs am-text-secondary"  onclick="location='/TVPrograms/addOne.do?_id=${t._id}&userName=${datamanager.username}&forwardUrl=${forwardUrl}'" ><span class="am-icon-pencil-square-o"></span> 编辑</button>

<button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"   onclick="check('${t._id}','${datamanager.username}')"><span class="am-icon-trash-o"></span> 删除</button>

</div>

</div>

</td>

</tr>

[/#list]

[/#if]

</tbody>

</table>

js代码:

//logcontent内容过长

$(".logcontent").each(function(){

$(this).click(function(){

var a = $(this).css("white-space");

if(a=="nowrap"){

$(this).css("white-space","normal");

}else{

$(this).css("white-space","nowrap");

}

})

})

style="table-layout: fixed;":设置表格大小固定 (列宽由表格宽度和列宽度设定)。

style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"

   overflow:溢出内容会被修剪,并且其余内容是不可见的。

   white-space:规定段落中的文本不进行换行

   text-overflow:显示省略符号来代表被修剪的文本。

table单元格内容过多换行显示的更多相关文章

  1. Vue. 之 Element table 单元格内容隐藏

    Vue. 之 Element table 单元格内容隐藏 在table显示数据时,若某个单元格的内容过多,需要进行隐层,在这一列的单元格属性添加::show-overflow-tooltip=&quo ...

  2. html 让table表格中的td单元格内容过长显示为固定长度,多余部分用省略号代替?

    <th class="wrap">商品名</th> .wrap{ width: 150px; //设置需要固定的宽度 white-space: nowrap ...

  3. LaTex表格内单元格内容强制换行

    /newcommand{/tabincell}[2]{/begin{tabular}{@{}#1@{}}#2/end{tabular}}%放在导言区 %然后使用&/tabincell{c}{} ...

  4. LaTex: 表格单元格内容 分行显示/换行

    问题:如何同时让表格同一行一个单元格的文字能垂直居中?比如说文字超长超出页面范围需要分行显示 答:(来源于smth) 方案一: \newcommand{\tabincell}[2]{\begin{ta ...

  5. Easyui datagrid 设置内容超过单元格宽度时自动换行显示

    datagrid 设置内容超过单元格宽度时自动换行显示 by:授客 QQ:1033553122 测试环境 jquery-easyui-1.5.3 问题描述 单元格内容超过单元格宽度不会自动化换行.如下 ...

  6. EasyUI Datagrid 鼠标悬停显示单元格内容 复制代码

    EasyUI Datagrid 鼠标悬停显示单元格内容 ,halign:, align: 0 « 上一篇:LINQ to Entities 中的查询» 下一篇:去掉字符串中的非数字字符 posted ...

  7. EasyUI的Datagrid鼠标悬停显示单元格内容

    功能描述:table鼠标悬停显示单元格内容 1.js函数 function hoveringShow(value) { return "<span title='" + va ...

  8. js如何实现动态显示表格数据(点奇数显示奇数单元格内容)

    js如何实现动态显示表格数据(点奇数显示奇数单元格内容) 一.总结 一句话总结: 1.动态指定表格中每个单元格的id,然后通过id可以获取每个单元格,然后对里面的innerHTML进行赋值. 2.弄了 ...

  9. C# DataGridView在单元格提示里(ToolTip)显示完整的单元格内容

    当单元格内容太多时,则会忽略后面的内容 解决方案: 添加Dgv鼠标移到单元格事件时,设置当前单元格的ToolTipText属性内容为当前单元格内容 void From_Load(object send ...

随机推荐

  1. Nginx源码安装及调优配置(转)

      导读 由于Nginx本身的一些优点,轻量,开源,易用,越来越多的公司使用nginx作为自己公司的web应用服务器,本文详细介绍nginx源码安装的同时并对nginx进行优化配置. Nginx编译前 ...

  2. R+hadoop

    这里面的配置 http://www.rdatamining.com/big-data/r-hadoop-setup-guide root@kali:~/hadoop_home/hadoop-1.2.1 ...

  3. PAT 乙级 1059

    题目 题目地址:PAT 乙级 1059 题解 开始我是从暴力循环的角度考虑这道题,大概计算了一下时间复杂度应该不会超,但是很不幸没有通过,时间超限:之后考虑搜索算法可能优化不太好,因此就把输入的序列先 ...

  4. Tomcat:javax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidDataSourceStat异常

    问题: 在关闭tomcat时: Tomat报出一下异常:ERROR [com.alibaba.druid.stat.DruidDataSourceStatManager] – unregister m ...

  5. MySQL - CASE WHEN ... THEN ... ELSE ... END语句

    范例: CASE WHEN p.allow_over = 1 THEN p.allow_over_capital ELSE 0 END

  6. 微信小游戏 demo 飞机大战 代码分析(四)(enemy.js, bullet.js, index.js)

    微信小游戏 demo 飞机大战 代码分析(四)(enemy.js, bullet.js, index.js) 微信小游戏 demo 飞机大战 代码分析(一)(main.js) 微信小游戏 demo 飞 ...

  7. GoF23种设计模式之结构型模式之桥接模式

    一.概述         将类的抽象部分与实现分部分离开来,使它们都可以独立地变化. 二.适用性 1.你不希望在抽象和实现之间有一个固定的绑定关系的时候.例如:在程序运行时实现部分应可以被选择或切换. ...

  8. 记忆化搜索:POJ1579-Function Run Fun(最基础的记忆化搜索)

    Function Run Fun Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 14815 Accepted: 7659 Des ...

  9. [BZOJ2947]促销(Splay)

    Description Great Bytelandish的超级市场网络请你编写一个程序模拟促销商品的成本费用(simulating costs of the promotionbeing prepa ...

  10. 51nod_1154 回文串的划分

    说实话..最开始看这题感觉一定好难...好高大上...我的马拉车还不熟....这种..但是本着做不出来也要至少看看的心态,吧个题看完了..然后简单的想了想,好像是个挺直观的动态规划,因为看到数据几乎就 ...