解决方案 »

  1.   

    用css  width:10px;text-overflow:ellipsis;
      

  2.   

    js获取文字字节长度后js实现吧  css兼容不了
      

  3.   

    在线演示
    代码演示:<!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <title>test</title>
        <style type="text/css">
            .ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
            .a{ width:150px; height:20px; overflow:hidden;}
        </style>
    </head>
    <body>
    <div class="a ellipsis">问个关于easyui的问题呗。给easyui.datagrid写扩展方法后,除了手动触发和绑定onloadsuccess事件以外,有没有其他方法触发该函数。最好能在调用.datagrid()时触发。</div>
    </body>
    </html>兼容性列表:
    https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow
      

  4.   

    在jsp页面中加上下面两句话试试
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />