- $("#tblGrid").datagrid({
- onLoadSuccess: function (data) {
- $(".easyui-tooltip").tooltip({
- // content:'<span class="easyui-tooltip">This is the tooltip message.</span>',
- onShow: function () {
- $(this).tooltip('tip').CSS({
- color: '#fff',
- background: '#055395',
- border: '1px solid #2196F3',
- borderRadius: '5px',
- });
- }
- })
- }
- });
- function showTitle(value, data, index) {
- return '<span title='+value+'class="easyui-tooltip">' + value + '</span>';
- }
- <thead>
- <tr>
- <th data-options="field:'name',width:5,formatter:showTitle"> 姓名 </th>
- </tr>
- </thead>
来源: http://www.bubuko.com/infodetail-3075875.html