@@ -46,6 +46,7 @@ $(function(){
|
|||||||
if($(this).text().trim().length>28){
|
if($(this).text().trim().length>28){
|
||||||
//给td设置title属性,并且设置td的完整值.给title属性.
|
//给td设置title属性,并且设置td的完整值.给title属性.
|
||||||
var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");
|
var strTitle = $(this).text().trim().replace(/[\r\n]/g,"").replace(/\s+/g, " ");
|
||||||
|
$(this).attr("titleHidden",strTitle); // 加一个不含换行的隐藏文本方便其它复制处理
|
||||||
//解决火狐title不能自动换行
|
//解决火狐title不能自动换行
|
||||||
var count = Math.floor(strTitle.length/62);
|
var count = Math.floor(strTitle.length/62);
|
||||||
for(var i=1;i<=count;i++){
|
for(var i=1;i<=count;i++){
|
||||||
@@ -107,9 +108,12 @@ $(function(){
|
|||||||
text=$(element).text().trim()
|
text=$(element).text().trim()
|
||||||
}
|
}
|
||||||
if(!$(element).find(".tooltips").length>0&&typeof($(element).attr("title"))!="undefined"&&$(element).attr("title")!=null&&$(element).attr("title").length > 0){
|
if(!$(element).find(".tooltips").length>0&&typeof($(element).attr("title"))!="undefined"&&$(element).attr("title")!=null&&$(element).attr("title").length > 0){
|
||||||
|
// text=$(element).attr("titleHidden").trim();
|
||||||
|
// if(text==null&&text==''){
|
||||||
text=$(element).attr("title").trim();
|
text=$(element).attr("title").trim();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
// text=text.replace(/[\r\n]/g,"");// 去掉换行
|
||||||
//特殊字符转义
|
//特殊字符转义
|
||||||
text=text.replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];});
|
text=text.replace(/[<>&"]/g,function(c){return {'<':'<','>':'>','&':'&','"':'"'}[c];});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user