varstr=" sdfa ";
String.prototype.iTrim=function(){//去除两边的空白
return this.replace(/(^\s*)|(\s*$)/g,"");
}
alert("|"+str.iTrim()+"|");
varstr=" sdfa ";
String.prototype.iTrim=function(){//去除两边的空白
return this.replace(/(^\s*)|(\s*$)/g,"");
}
alert("|"+str.iTrim()+"|");