CSS:
#datatableID {
background: none repeat scroll 0 0;
margin: 0px auto;
width: 100%;
table-layout: fixed;
border: 1px solid #a1bcdb;
}
#datatableID td {
border: 1px solid #a1bcdb;
word-break: break-all;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
jQuery:
<script>
jQuery(function() {
$("#datatableID tr:gt(0)").each(function(i) {
var td = $(this).find("td:eq(8)");
//给td设置title属性,并且设置td的完整值.给title属性.
td.attr("title", td.text());
});
});
</script>