1 $("#tblGrid").datagrid({ 2 onLoadSuccess: function (data) { 3 $(".easyui-tooltip").tooltip({ 4 // content:'<span class="easyui-tooltip">This is the tooltip message.</span>', 5 onShow: function () { 6 $(this).tooltip('tip').css({ 7 color: '#fff', 8 background: '#055395', 9 border: '1px solid #2196F3', 10 borderRadius: '5px', 11 }); 12 } 13 }) 14 } 15 });
1 function showTitle(value, data, index) { 2 return '<span title='+value+' class="easyui-tooltip">' + value + '</span>'; 3 }
1 <thead> 2 <tr> 3 <th data-options="field:'name',width:5,formatter:showTitle">姓名</th> 4 </tr> 5 </thead>