//隐藏数字的方法
function hiddenText(id,name){
name_x=name.toString();
var length = name_x.length;
if (length > 4) name_x = name_x.substring(0,4)+ '...';
var arr = [];
var str = '<a style="position:relative;cursor: pointer !important;text-decoration: none;" role="tab" data-toggle="tab" title="'+name+'"';
str+="onclick='javascript:;'>";
str+= name_x+'</a>';
arr.push(str);
$(id).html(arr.join(""));
}
例子:
总数:<span name="all_count"></span>
hiddenText("#all_count","12321432432432433");