本博主最近正在建設一個9元包郵的網站,希望各位光臨指導一些意見: 9元包郵 http://www.jiubaou.com/
//截取字符串
String.prototype.cutString = function(length){
var temp = (this.replace(/([\u0391-\uffe5])/ig,'$1a').substring(0,length).replace(/([\u0391-\uffe5])a/ig,'$1'));
if(this != temp)
{
temp = temp +'...';
}
return temp;
}