GridView 内容自动换行 简单记录
$("#GridView1 tr td:last-child").each(function ()
{
var width = $(document).width() - 700.0;
var html = $(this).html()//获取内容
$(this).html("<div style=\"white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; table-layout: fixed \">" + html + "</div>").width(width);//添加div并设置样式和宽度
});
posted on 2013-07-03 16:50 lanyue52011 阅读(181) 评论(0) 收藏 举报