var cutStrForNum = function (str,num) {
var len = 0;
for (var i = 0; i < str.length; i++) {
if (str[i].match(/[^x00-xff]/ig) != null) //全角
len += 2;
else
len += 1;
}
if (len >=num) {
newStr = str.substring(0,num) + "...";
}
return newStr;
}